Monitoring Objects, Counters, and Instances for Performance Bottlenecks
In this section we elaborate on some of the most commonly used performance counters. These counters are key when you’re attempting to determine processor, memory, and disk bottlenecks. We provide some real world examples that show how to determine each bottleneck. We do not cover all of the system counters, as they would require a book of their own.
NOTE
If you don’t see a counter mentioned that you need information on, you can use online help to get a description of each counter. To access this information,
Processor Bottlenecks
When analyzing the performance of a Web application, one of the most commonly
For a system with multiple processors, System Monitor lists an instance of each processor in the Add Counters dialog box. You can also view the average value of all processors by monitoring the Total instance . In a single processor system, System Monitor lists the total and one processor instance; both refer to the single processor.
Below is a list of counters that should be
The percentage of elapsed time that the processor spends to execute a non-idle thread. It is calculated by measuring the duration of the idle thread that is active in the sample interval, and subtracting that time from interval duration. (Each processor has an idle thread that consumes cycles when no other threads are ready to run). This counter is the primary indicator of processor activity, and displays the average percentage of busy time observed during the sample interval. It is calculated by monitoring the time that the service is inactive and subtracting that value from 100 percent.
The percentage of elapsed time that the process threads spent executing code in privileged mode. When a Windows system service is called, the service will often run in privileged mode to gain access to system-private data. Such data is protected from access by threads executing in user mode. Calls to the system can be explicit or implicit, such as page faults or interrupts. Unlike some early operating systems, Windows uses process boundaries for subsystem protection in addition to the traditional protection of user and privileged modes. Some work done by Windows on
The percentage of time the thread is running in the code of a user mode process or code other than the operating system’s code.
% User Time
should always be
The time the processor spends receiving and
The average rate, in incidents per second, at which the processor received and serviced hardware interrupts. It does not include deferred procedure calls (DPCs), which are counted separately. This value is an indirect indicator of the activity of devices that generate interrupts, such as the system clock, the mouse, disk drivers, data communication lines, network interface cards, and other peripheral devices. These devices normally interrupt the processor when they have completed a task or require attention. Normal thread execution is suspended. The system clock typically interrupts the processor every 10 milliseconds, creating a background of interrupt activity.
To observe the efficiency of a multiprocessor computer, use the counters listed in Table 4-1.
|
Counter |
Description |
|
Process\ % Processor Time |
The sum of processor time on each processor for all threads of the process. |
|
Processor(_Total)\ % Processor Time |
Lists activity for all processors in the computer. It’s the average non-idle time of all processors during the time interval divided by the number of processors. It should be noted that the counter will have a value of 50% if all processors are busy for half of the sample interval and if half of the processors are busy for the entire interval. |
|
Process\ % Processor Time |
The sum of processor time on each processor for all threads of the process. |