ancruna / mongoose

Automatically exported from code.google.com/p/mongoose
MIT License
0 stars 0 forks source link

How to get current busy worker threads which are serving clients ? #352

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. I am running with 50 threads when I am having many request at the same time 
server is taking a long time to response. 

What is the expected output? What do you see instead?

Is there a way I can get current working thread thread count which are busy in 
serving other user so I can increase number of thread according to the 
requirement. 

Original issue reported on code.google.com by goelvive...@gmail.com on 8 May 2012 at 7:36

GoogleCodeExporter commented 9 years ago
How many cores does the machine actually have?
If it is less than 50 it doesn't make sense from the performance point of view.
Typically the the performance gets worse when more (~) threads than cores are 
running.

Original comment by nullable...@gmail.com on 8 May 2012 at 7:53

GoogleCodeExporter commented 9 years ago
My machine have only 2 cores. But all threads are doing only io operation.
Must of the time they are busy in IO.
Main question way is there way or variable which I can use to get current
working thread count ?

Original comment by goelvive...@gmail.com on 8 May 2012 at 8:10

GoogleCodeExporter commented 9 years ago
Adding one more point I am running server as embedded server inside my 
function. I want to log when my all working threads are busy. 

Original comment by goelvive...@gmail.com on 8 May 2012 at 9:08

GoogleCodeExporter commented 9 years ago
Probably it helps, at least for diagnostic, to define DEBUG - this way you have 
additional information, also about the worker threads.

Original comment by nullable...@gmail.com on 8 May 2012 at 6:17