Assumed you cluster your node app on a 4 CPU system, in 4 workers(childprocesses=new V8 instance) and each worker starts with about 10mb memory(default).
Is there a way to start them with more? like
--max-old-space-size=...
And how can I pass in more V8-settings to workers?
( + how do strongloop and PM2 handle it? ;) )
You can use cluster.setupMaster()
to set the arguments passed to worker processes. Specifically there is an undocumented execArgv
setting that defaults to process.execArgv
, but you should be able to pass any array of node/v8-specific flags there.
Application arguments are passed via the args
setting.