Why is node.js process taking up more memory than allocated

Can someone explain why my Node.js process takes more than the allocated memory?

I assigned 4G of memory to the Nodejs process (the maximum is supported on a 64-bit machine, according to the Nodejs document), but I saw the process touching 5.6g of RSS memory (the path above 4g that I assigned)

This is how I start the process

node -max-old-space-size=4096 processName.js

Here is what my TOP team shows (RSS @ 4.6g) enter image description here

+4
source share
1 answer

max-old-space-size node.js , Javascript- ( V8), . , max-old-space-size , node.js.

, max-old-space-size.

+6

Source: https://habr.com/ru/post/1615973/


All Articles