Monitoring Objects, Counters, and Instances for Performance Bottlenecks

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, open System Monitor, follow the steps to add a counter, which are described earlier in this chapter. When the Add Counters dialog box opens, click on the counter you want information on and then click the Explain button.

Processor Bottlenecks

When analyzing the performance of a Web application, one of the most commonly observed components is CPU utilization. The server s CPU is performing complex operations and therefore is a logical place to start when observing the performance of the Web server. The general processor information is contained in the processor object. The primary objective of monitoring processor-specific counters is to identify any potential processor bottlenecks on the server. As a best practice you should limit CPU utilization to an average of 75 percent or below for each processor, although short bursts of 100 percent utilization could be tolerable depending on the nature and user base of the application. High CPU utilization can lead to high context switching (discussed later in the chapter) which causes undesirable overhead. So, though you may be running at 90 percent CPU utilization, you might not be getting optimal throughput compared to when you re running at 70 percent or 75 percent utilization.

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 monitored when investigating a processor level bottleneck. Additionally, we describe best practices when using the Processor object counters.

  • % Processor Time

    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.

  • % Privileged Time

    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 behalf of the application might appear in other subsystem processes in addition to the privileged time in the process.

  • % User Time

    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 viewed for sanity against % Privileged Time on System and Processor objects, as they are measures of non-idle time and sum the total of non-idle time.

  • % Interrupt Time

    The time the processor spends receiving and servicing hardware interrupts during sample intervals. 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 during interrupts. Most system clocks interrupt the processor every 10 milliseconds, creating a background of interrupt activity. This counter displays the average busy time as a percentage of the sample time.

  • Interrupts/sec

    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.

Table 4-1. Counters for Multiprocessor Computers

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.



Performance Testing Microsoft  .NET Web Applications
Performance Testing Microsoft .NET Web Applications
ISBN: 596157134
EAN: N/A
Year: 2002
Pages: 67

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net