Monday, 22 May 2017

Does multiple apps work on multiple cores if launched in fork_mode with pm2?

I created a steam bot script which i use for 3 steam accounts. To run them i starts the same script with pm2 in fork mode passing an argument which is the bot id. Do all of the 3 processes run on the same core or can they use the second core as well since they are separated processes? If they run on a single core, starting the script like "pm2 start script.js -i number of bots" and using the worker id as the bot id could make them run an all cores? I'm not sure if this will work though, I'm still learning about node js cluster.



via Alexandru Chelan

No comments:

Post a Comment