From a55f3e6ed7ad267bcd9a74e9e6cdbd59b394a1f7 Mon Sep 17 00:00:00 2001 From: Alexandre ABRIOUX Date: Wed, 21 Aug 2024 12:53:03 +0200 Subject: [PATCH 1/3] doc,cli: clarify --max-old-space-size and --max-semi-space-size units --- doc/api/cli.md | 6 +++--- doc/api/worker_threads.md | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/api/cli.md b/doc/api/cli.md index 0d2e28d22ec511..f4a541bfb8ff16 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -3396,7 +3396,7 @@ documented here: ### `--perf-prof-unwinding-info` -### `--max-old-space-size=SIZE` (in megabytes) +### `--max-old-space-size=SIZE` (in MiB) Sets the max memory size of V8's old memory section. As memory consumption approaches the limit, V8 will spend more time on @@ -3409,10 +3409,10 @@ On a machine with 2 GiB of memory, consider setting this to node --max-old-space-size=1536 index.js ``` -### `--max-semi-space-size=SIZE` (in megabytes) +### `--max-semi-space-size=SIZE` (in MiB) Sets the maximum [semi-space][] size for V8's [scavenge garbage collector][] in -MiB (megabytes). +MiB (mebibytes). Increasing the max size of a semi-space may improve throughput for Node.js at the cost of more memory consumption. diff --git a/doc/api/worker_threads.md b/doc/api/worker_threads.md index 2948ffeab72d64..b718a90f621178 100644 --- a/doc/api/worker_threads.md +++ b/doc/api/worker_threads.md @@ -1500,8 +1500,8 @@ thread spawned will spawn another until the application crashes. [`'close'` event]: #event-close [`'exit'` event]: #event-exit [`'online'` event]: #event-online -[`--max-old-space-size`]: cli.md#--max-old-space-sizesize-in-megabytes -[`--max-semi-space-size`]: cli.md#--max-semi-space-sizesize-in-megabytes +[`--max-old-space-size`]: cli.md#--max-old-space-sizesize-in-mib +[`--max-semi-space-size`]: cli.md#--max-semi-space-sizesize-in-mib [`ArrayBuffer`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer [`AsyncResource`]: async_hooks.md#class-asyncresource [`Buffer.allocUnsafe()`]: buffer.md#static-method-bufferallocunsafesize From e3acdfe8ec389dadde8e4cbe8d615dd95d560ed6 Mon Sep 17 00:00:00 2001 From: Alexandre ABRIOUX Date: Thu, 22 Aug 2024 20:23:35 +0200 Subject: [PATCH 2/3] fix: add additional anchors to preserve old links --- doc/api/cli.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/api/cli.md b/doc/api/cli.md index f4a541bfb8ff16..5e374111d29424 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -3396,6 +3396,9 @@ documented here: ### `--perf-prof-unwinding-info` + + + ### `--max-old-space-size=SIZE` (in MiB) Sets the max memory size of V8's old memory section. As memory @@ -3409,6 +3412,9 @@ On a machine with 2 GiB of memory, consider setting this to node --max-old-space-size=1536 index.js ``` + + + ### `--max-semi-space-size=SIZE` (in MiB) Sets the maximum [semi-space][] size for V8's [scavenge garbage collector][] in From ef02b27c3f7bc9e3e1a79ea05b2d4cda856e3c2c Mon Sep 17 00:00:00 2001 From: Alexandre ABRIOUX Date: Thu, 22 Aug 2024 21:39:28 +0200 Subject: [PATCH 3/3] fix formatting --- doc/api/cli.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/api/cli.md b/doc/api/cli.md index 5e374111d29424..d6f1ee23e06fd9 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -3397,6 +3397,7 @@ documented here: ### `--perf-prof-unwinding-info` + ### `--max-old-space-size=SIZE` (in MiB) @@ -3413,6 +3414,7 @@ node --max-old-space-size=1536 index.js ``` + ### `--max-semi-space-size=SIZE` (in MiB)