From 4fc0fdc6ee8c41320f4d4ea74e4fa8a3ac12ed57 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Wed, 9 Nov 2011 17:32:39 +0100 Subject: [PATCH] bench: start (NUM_CPUS-1) workers The master is a worker too so fork off one less worker. --- benchmark/http_simple_cluster.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/benchmark/http_simple_cluster.js b/benchmark/http_simple_cluster.js index b49ea400b7..ecc3169adb 100644 --- a/benchmark/http_simple_cluster.js +++ b/benchmark/http_simple_cluster.js @@ -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'); }