pm2 start script.js -i 2
I am trying to run a script using PM2 and want it use only 2 core of my CPU. I have only 1 CPU (2.5 GHz Intel Core i7) with 8 core on my Mac.
But when it starts, it takes of my CPU cores in use and creates 8 instances of the script in cluster.
Is it me missing something to run it properly? or It is a bug?
I would like to control the number of cores of CPU to be used by PM2
pm2 start script.js -i 2
I am trying to run a script using PM2 and want it use only 2 core of my CPU. I have only 1 CPU (2.5 GHz Intel Core i7) with 8 core on my Mac.
But when it starts, it takes of my CPU cores in use and creates 8 instances of the script in cluster.
Is it me missing something to run it properly? or It is a bug?
I would like to control the number of cores of CPU to be used by PM2