fix worker count
This commit is contained in:
parent
e479133a4a
commit
479e0d8863
@ -3,7 +3,7 @@ const numCPUs = require('os').cpus().length;
|
|||||||
|
|
||||||
if (cluster.isMaster) {
|
if (cluster.isMaster) {
|
||||||
console.log(`Master ${process.pid} is running`);
|
console.log(`Master ${process.pid} is running`);
|
||||||
console.log(`Total Workers ${numCPUs*8}`)
|
console.log(`Total Workers ${numCPUs}`)
|
||||||
// Fork workers
|
// Fork workers
|
||||||
for (let i = 0; i < numCPUs; i++) {
|
for (let i = 0; i < numCPUs; i++) {
|
||||||
cluster.fork();
|
cluster.fork();
|
||||||
|
Loading…
Reference in New Issue
Block a user