Our server runs Node.JS on a cloud PaaS (specifically Bluemix).
We can configure the amount of allocated memory through the PaaS dashboard, but I noticed that for values above ~1.4GB you also need to execute node with the --max-old-space-size
option (explanation here).
This means that whenever I want to change the size of allocated memory, I have to change it in two places in the settings.
What would happen if I call node --max-old-space-size 99999999999 app.js
? Will Node.JS try to allocate 99999999999MB, or will it consider the actual memory-limit of the VM\Container in which it runs? Does it affect the behavior of the GC (i.e. if it looks like there is a lot of free space, the GC will run less times)? Is there a --max-old-space-size use-machine-limits
option?
Thanks