Exposing metrics in mongodb processes on whether client driven threads were active or idle would provide better insight into the overall utilization of the system and the disposition of client threads.
One data point might come from incrementing a counter on client creation, then decrementing on entry to the MONGO_IDLE_THREAD_BLOCK (used internally to hide uninteresting callstacks for debugging). Another might only increment and decrement around top level calls to recv (to indicate threads engaged in client work, idle or not)
- is related to
-
SERVER-38104 serverStatus metrics for currently in-progress ops/commands
- Closed