Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cluster workers are not getting fully used. #187

Open
saikrishna15 opened this issue May 7, 2014 · 5 comments
Open

Cluster workers are not getting fully used. #187

saikrishna15 opened this issue May 7, 2014 · 5 comments

Comments

@saikrishna15
Copy link

I'm running this code https://github.com/igrigorik/node-spdyproxy/blob/master/bin/spdyproxy on a 32 core linux system(virtual server), however

I added following code http://pastebin.com/MmuS5Ptg just commented proxy.listen code and added the above snippet of pastebin, when I ran the command below as said in this module documentation (https://www.npmjs.org/package/spdyproxy)

spdyproxy -k keys/mykey.pem -c keys/mycert.pem -p 44300 -v
which gave me 32 threads. I'm not sure if all these threads are running, when I do a top command I get this topcommand
Only few nodes are being used? Why is this. I'm using node version v0.10.26 and latest cluster.

@ynkm169
Copy link

ynkm169 commented Sep 9, 2014

Exact issue I have...One node process is used extensively to 100%, all other node processes used lightly under 5%, this is extremely unbalanced.

I am launching 100k connections with only two client simulation machine though (each machine launching about 50k test client connections) This means all 100k clients only have 2 unique IP. I am not sure how Node.js balances connections in relation to IP though.

PLEASE HELP!!!!
PLEASE HELP!!!!
PLEASE HELP!!!!
PLEASE HELP!!!!

BTW, my setup has nothing to do with the setup above...it is just a typical master worker cluster setup with websocket server. Like the example in here:

http://nodejs.org/api/cluster.html

@ynkm169
Copy link

ynkm169 commented Sep 9, 2014

How does Cluster load balance workers????????????
If I setup Haproxy load balancer with two node instances listening to two different ports, the node instances get extremely balanced, each using exact same amount of cpu and serve exact same amount of clients.

PLEASE HELP!!!!

@saikrishna15
Copy link
Author

Hey, We tried this, it got ,me little positive results like 4_num_of_Cpus in for loop or 6_num_of_cpus, but be careful with that, this experiment if more than 4 or 6 is tried, your server may use up all cpu and even wont allow you to login.

@ynkm169
Copy link

ynkm169 commented Sep 9, 2014

what is 4*num_of_Cpus? didn't understand

@ynkm169
Copy link

ynkm169 commented Sep 9, 2014

THE ISSUE IS NOT JUST 100% CPU usage. The real problem is when 1 cpu is loaded to 100%, it is using up lots of memory as well. My worker crashes and that probably relates to the V8 1.7GB process memory limit.............

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants