Get warning of performance degradation when using cluster module and cause some function not working

630 views
Skip to first unread message

Ket

unread,
Jul 22, 2013, 7:04:27 AM7/22/13
to nod...@googlegroups.com
I use the cluster module according this manual: http://nodejs.org/api/cluster.html

The block of code is:

var cluster = require('cluster');
var http = require('http');
var numCPUs = require('os').cpus().length

if (cluster.isMaster) {
  // Fork workers.
  for (var i = 0; i < numCPUs; i++) {
    cluster.fork();
  }

  cluster.on('exit', function(worker, code, signal) {
    console.log('worker ' + worker.process.pid + ' died');
  });
} else {
// create server
}

And I get this warning:

C:\Program Files\nodejs>node server.js
Warning: Native modules not compiled.  XOR performance will be degraded.
Warning: Native modules not compiled.  UTF-8 validation disabled.
Warning: Native modules not compiled.  XOR performance will be degraded.
Warning: Native modules not compiled.  UTF-8 validation disabled.
Warning: Native modules not compiled.  XOR performance will be degraded.
Server is listening on port 8080
Warning: Native modules not compiled.  XOR performance will be degraded.
Warning: Native modules not compiled.  UTF-8 validation disabled.
Warning: Native modules not compiled.  UTF-8 validation disabled.
Server is listening on port 8080
Warning: Native modules not compiled.  XOR performance will be degraded.
Warning: Native modules not compiled.  UTF-8 validation disabled.
Server is listening on port 8080
Server is listening on port 8080

The program did what it warned.
What is the possibility of the cause, and how to fix this.
I use them on a Ubuntu 12.04 server and a windows 7 computer. The node version is 0.10.13.
I also tested version 0.11.03 on both machine the windows one works fine but the linux.

I love cluster and I don't want to ditch this. The version I would use is 0.10.13 because it's more stable.
Thank you,

Ben Noordhuis

unread,
Jul 22, 2013, 9:44:17 AM7/22/13
to nod...@googlegroups.com
That warning is unrelated to the cluster module, it's generated by the
websocket module that you're using (and snipped from your example
code...)

Ket Nonting

unread,
Jul 22, 2013, 1:44:30 PM7/22/13
to nod...@googlegroups.com
Thank you,

I've downgrade the websocket module and it fixed.



--
--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com
To unsubscribe from this group, send email to
nodejs+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

---
You received this message because you are subscribed to a topic in the Google Groups "nodejs" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/nodejs/xwWSGrt3giI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to nodejs+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.





--
Meldville
Reply all
Reply to author
Forward
0 new messages