What happens if I call node-max-old-space-size 99999999999 app.js? Will Node.JS try to allocate 99999999999MB, or will it look at the actual VM \ Container memory limit in which it works?
Node will not allocate the specified memory, but it will try in response to the growing need for memory, if this happens, in the application - in stages - in fairly small fragments.
Does this affect the behavior of the GC (i.e. if it looks like there is a lot of free space, the GC will work less time)?
Yes, the ownership space can contain a lot of garbage, and allocation will be less frequent.
Is there a -max-old-space-size-use-machine-limits option?
Honestly, I donβt know, but I will investigate this and update it here if I get information about it.
Hope this helps.
source share