You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
--max-semi-space-size doc is wrong after Node 18 #55487
The default value is 16 MiB for 64-bit systems and 8 MiB for 32-bit systems. To get the best configuration for your application, you should try different max-semi-space-size values when running benchmarks for your application.
This may have been true in Node 18 but in the newer version of v8 (11.3) used in Node 20, the default scales with the memory limit, and will generally be less than this documented value.
@redyetidev I'll try to determine where the crossover point is, that is, at what memory limit the new default equals the old default (>2GiB) and then I'll draft a true statement for the docs.
Activity
avivkeller commentedon Oct 22, 2024
PRs are always welcome :-)
joebowbeer commentedon Oct 22, 2024
@redyetidev I'll try to determine where the crossover point is, that is, at what memory limit the new default equals the old default (>2GiB) and then I'll draft a true statement for the docs.
joebowbeer commentedon Oct 22, 2024
The breakeven point in node:20 seems to be above memory limit 2g
docker run -it -m 3g \ node:20 node -e 'console.log(v8.getHeapStatistics().heap_size_limit/(1024*1024))' 1584node:18 seems to support the new NODE_OPTIONS
Without an explicit semi-space-size in node:20, the young generation in this case is only 3MB
Configuring semi-space-size, below, for same young generation size (48MB) as node:18
node:14 fails the new option
joebowbeer commentedon Oct 22, 2024
@redyetidev PR: #55495
doc: update `--max-semi-space-size` description
doc: update `--max-semi-space-size` description