Skip to content

Commit

Permalink
doc: add new useful V8 option
Browse files Browse the repository at this point in the history
Add the '--max_semi_space_size' flag into useful V8 option.

Fixes: nodejs#42511
  • Loading branch information
JialuZhang-intel committed Apr 2, 2022
1 parent 127da0f commit a28ef1b
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions doc/api/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -1980,6 +1980,22 @@ On a machine with 2 GB of memory, consider setting this to
$ node --max-old-space-size=1536 index.js
```

### `--max_semi_space_size=SIZE` (in megabytes)

Sets the maximum
[semi\_space](https://www.memorymanagement.org/glossary/s.html#semi.space)
size for V8's [scavenge](https://v8.dev/blog/orinoco-parallel-scavenger)
garbage collector.
Increase the value of max\_semi\_space\_size may bring
the throughput improvement for node and the cost is more memory consumption.
The acutal throughput improvement and memory consumption
are relevant to your application
([reference](https:/nodejs/node/issues/42511)).

_The default max\_semi\_space\_size is
16MB for 64bit system and 8MB for 32bit system.
The recommand value is 64MB or 128MB if your system have enough memory._

[Chrome DevTools Protocol]: https://chromedevtools.github.io/devtools-protocol/
[CommonJS]: modules.md
[ECMAScript module loader]: esm.md#loaders
Expand Down

0 comments on commit a28ef1b

Please sign in to comment.