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

Multitread Support #4

Open
cdgraff opened this issue Jun 17, 2015 · 7 comments
Open

Multitread Support #4

cdgraff opened this issue Jun 17, 2015 · 7 comments

Comments

@cdgraff
Copy link

cdgraff commented Jun 17, 2015

Hi, today I running signalbox ([email protected] branch) with a good amount of concurrent users, but my doubt is about multitread support, why into TOP I see the CPU used al 100% and never grow more than this...

Video here: https://www.dropbox.com/s/307qg3lek73ip4t/htop-signalbox.mp4?dl=0

Thanks for any advice!

@cfreeman
Copy link
Owner

You need to set the environment variable GOMAXPROCS. Go will only use one CPU/Core by default unless you set GOMAXPROCS. See http://golang.org/doc/faq#Why_no_multi_CPU for more details.

@cdgraff cdgraff changed the title Multitread Support? and Connection don't close Multitread Support Jun 18, 2015
@cfreeman
Copy link
Owner

How did GOMAXPROCS go? Can I close this one off?

@cdgraff
Copy link
Author

cdgraff commented Jun 21, 2015

yes after setup GOMAXPROCS cpu use was shared with the 4 process that I setup.

About perf of this actions, just with a few users i see that use 100% off all CPUs like can see into the image:
captura de pantalla 2015-06-21 18 45 46
Thanks!

@cfreeman
Copy link
Owner

Well that certainly shouldn't be the case. Does it slowly ramp up, or does it reach a point where it suddenly blasts your CPUs? Can you dig through the logs and let me know how many people are connected and how many rooms you have?

@cdgraff
Copy link
Author

cdgraff commented Jun 23, 2015

Hi, the rump up, is quick just when we enabled and start to send traffic to the tracker increase in seconds to reach high CPU use.

The max numbers of users into a room was:
2015/06/23 01:43:41 INFO - Writing /roominfo|{"memberCount":454} to 0xc2099c7d10

But i see many lines equal except by the ID, look like something be wrong. Here 10 min full log
https://www.dropbox.com/s/66d850bal6c5sat/signalbox.log.2.tar.gz?dl=1

I think you will understand better what check into the logs...

thanks!

@cfreeman
Copy link
Owner

Sorry. I'm logging everything at the moment. I have toned things down a little in your branch and evaluating leveled logging libraries for go. This one here -- https://github.com/golang/glog -- is looking like the winner at this stage. I also need to write some load tests. Lemme know if the turning down logging improves things much.

@cdgraff
Copy link
Author

cdgraff commented Jun 23, 2015

Hi, after this changes, the CPU use is much lower, but I see 1 process using 100% of 1 core... and the other process just less than 5% average... something still happen with this tread... and when this reach 100% can't accept more users, websocket deny new connection by timeout.

Logs of this can downloaded here:
https://www.dropbox.com/s/l1hngfylqzdy08x/signalbox.log.2?dl=1

Let me know if need any new test
Thanks!
Ale

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