I need to diagnose a server that is unable to reach peak performance. CPU usage drops to zero for around 500ms and then spikes to 100% while trying to process the queued requests, this pattern repeats during a number of hours after which the operation becomes smooth again (Operation had been smooth for years)
This suggests to me that the worker threads are idling while awaiting for an external event to occur. The application is complex and we haven't been able to pinpoint the culprit.
Can Process Monitor be configured to log every time a thread sleeps awaiting for some event? If possible, can the event be related to a particular stack trace?
If the above is possible, perhaps I could correlate the CPU drops with wait events and pinpoint the culprit.
I have successfully used Windbg before to diagnose these kinds of problems, however in this case, the wait is very brief and I'm not confident that I can make the debugger break exactly while the processor is idling.