Replies: 2 comments 3 replies
-
Not exactly but a good rule of thumb is that compaction needs 2x the size of the live objects. That 55% you observed is therefore very plausible. |
Beta Was this translation helpful? Give feedback.
-
Thank you for the hint, did some further research in this context, mainly staring from issue #40014 . Have tried few combinations of test script (progressively filling the heap at slow pace - in order gc to follow nicely) with different set of named parameters and node.js version. Starting like in Results are kind a interesting.
Would appreciate any further hint what to debug deeper and which direction to determine the root cause. Thank you in advance. |
Beta Was this translation helpful? Give feedback.
-
Hi,
seeing some interesting behavior on some of apps I have based on node.js v14.15.1.
I am observing
MarkCompactCollector: young object promotion failed Allocation failed - JavaScript heap out of memory
which I need to dig deeper to reveal the root cause. But what is interesting is - my experience with 'heap out of memory' was similar to 'near heap exhaustion' where it is clear that configured heap is near limit. But in my case - with following v8 options enabled:/usr/bin/node --max-old-space-size=6144--optimize_for_size --always_compact --heapsnapshot-signal=SIGUSR2
process dies ~55% of configured old space, i.e.:
Tried with max-old-space-size=8192, and this time again process dies ~55%, i.e.
All I would like to clarify is - if there are any default thresholds or relation between old, new, semi spaces, particularly this observed 55% and how this is made visible with inspector or some other tool?
Beta Was this translation helpful? Give feedback.
All reactions