Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
bench: start (NUM_CPUS-1) workers
The master is a worker too so fork off one less worker.
  • Loading branch information
bnoordhuis committed Nov 9, 2011
1 parent cdcb111 commit 4fc0fdc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion benchmark/http_simple_cluster.js
Expand Up @@ -2,7 +2,8 @@ var cluster = require('cluster');
var os = require('os');

if (cluster.isMaster) {
for (var i = 0, n = os.cpus().length; i < n; ++i) cluster.fork();
console.log('master running on pid %d', process.pid);
for (var i = 1, n = os.cpus().length; i < n; ++i) cluster.fork();
} else {
require(__dirname + '/http_simple.js');
}

0 comments on commit 4fc0fdc

Please sign in to comment.