Important Perfmon Metrics for Identifying Processor related Issues
Performance counters play a vital role in identifying performance issues of a software application. It is most important to monitor and analyze the relevant performance counters to quickly pin point any performance issues. Here I will mention few Perfmon counters that help in identifying Processor level performance bottlenecks.
Processor level issues arise when processor is very busy and it takes time to respond to the requests. High value for Perfmon counters: "Processor: % Processor Time", "System: Context Switches/sec" and "System\Processor Queue Length" indicates processor level issues. A "Context Switch" occurs when the kernel switches the processor from one thread to another or a thread with high priority takes control from a thread with lower priority or a running thread has to wait for some I/O operation. A high rate of context switching means that the processor is being shared repeatedly by many threads and because of this high amount of time is spent in saving and loading states of running/ready threads. "Processor Queue Length" value is a measure of how many threads are in the Ready state waiting to be processed, high value thus indicates that tasks have to wait for longer duration to get processed.
We can still drill down and find whether high Processor utilization is caused due to Hardware or Software. Perfmon counters like "Processor: Interrupts /sec" and "System: System Calls/sec" will help in determining that. If "Processor: Interrupts /sec" value is high then it reflects that high Processor utilization is due to Hardware, and if "System: System Calls/sec" value is high then it reflects that high Processor utilization is due to Software.