Menu

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

New
nobody
None
Medium
Defect
2012-05-08
2012-05-08
Anonymous
No

Originally created by: goelvive...@gmail.com

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.

Discussion

  • Anonymous

    Anonymous - 2012-05-08

    Originally posted by: nullable...@gmail.com

    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.

     
  • Anonymous

    Anonymous - 2012-05-08

    Originally posted by: goelvive...@gmail.com

    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 ?

     
  • Anonymous

    Anonymous - 2012-05-08

    Originally posted by: goelvive...@gmail.com

    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.

     
  • Anonymous

    Anonymous - 2012-05-08

    Originally posted by: nullable...@gmail.com

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

     

Log in to post a comment.