Understanding the Processor Counters

It is important to understand the components of the primary processor activity counters, and to distinguish them from each other.

Counter

Description

System: % Total Processor Time

For what proportion of the sample interval were all processors busy?

A measure of activity on all processors. In a multiprocessor computer, this is equal to the sum of Processor: % Processor Time on all processors divided by the number of processors. On single-processor computers, it is equal to Processor: % Processor time, although the values may vary due to different sampling time.

System: Processor Queue Length

How many threads are ready, but have to wait for a processor?

This is an instantaneous count, not an average, so it's best viewed in charts, rather than reports. Unlike disk queue counters, it counts only waiting threads, not those being serviced.

The queue length counter is on the System object because there is a single queue even when there are multiple processors on the computer.

Processor: % Processor Time

For what proportion of the sample interval was each processor busy?

This counter measures the percentage of time the thread of the Idle process is running, subtracts it from 100%, and displays the difference.

This counter is equivalent to Task Manager's CPU Usage counter.

Processor: % User Time
Processor: % Privileged Time

How often were all processors executing threads running in user mode and in privileged mode?

Threads running in user mode are probably running in their own application code. Threads running in privileged mode are using operating system services.

The user time and privileged time counters on the System and Processor objects do not always sum to 100%. They are measures of non-Idle time, so they sum to the total of non-idle time.

For example, if the processor was running the Idle thread for 85% of the time, the sum of Processor: % User Time and Processor: % Privileged Time would be 15%.

Process: % Processor Time

For what proportion of the sample interval was the processor running the threads of this process?

This counter sums the processor time of each thread of the process over the sample interval.

Process: % Processor Time: _Total

For what proportion of the sample interval was the processor processing?

This counter sums the time all threads are running on the processor, including the thread of the Idle process on each processor, which runs to occupy the processor when no other threads are scheduled.

The value of Process: % Processor Time: _Total is 100% except when the processor is interrupted. (100% processor time = Process: % Processor Time: Total + Processor: % Interrupt Time + Processor: % DPC Time) This counter differs significantly from Processor: % Processor Time, which excludes Idle.

Process: % User Time
Process: % Privileged Time

How often are the threads of the process running in its own application code (or the code of another user-mode process)? How often are the threads of the process running in operating system code?

Process: % User Time and Process: % Privileged Time sum to Process: % Processor Time.

Process: Priority Base

What is the base priority of the process? How likely is it that this process will be able to execute if the processor gets busy?

The base priority of the process establishes a range within which the dynamic priorities of its threads vary. . The system schedules ready threads for the processor in order of their dynamic priority.

Thread: Thread State

What is the processor status of this thread?

An instantaneous indicator of the dispatcher thread state, which represents the current status of the thread with regard to the processor. Threads in the Ready state (1) are in the processor queue.

In Performance Monitor, the threads of the Performance Monitor process, Perfmon.exe always appear to be running. . Other threads that are getting processor time, are those recorded as switching from Ready (1) to Waiting (5).

A table of Windows NT thread states appears in "Thread State" later in this chapter.

Thread: Priority Base

What is the base priority of the thread?

The base priority of a thread is determined by the base priority of the process in which it runs. Except for Idle and Real-time threads, the base priority of a thread varies only +/-2 from the base priority of its process.

Thread: Priority Current

What is the current dynamic priority of this thread? How likely is it that the thread will get processor time?

The Windows NT Microkernel schedules threads for the processor in order of their priority. . The system adjusts the dynamic priority of threads within the range of the base priority of the process to optimize the response of processes interacting with the user.

Thread: % Privileged Time

How often are the threads in the process running in their own application code (or the code of another user-mode process)? How often are the threads of the process running in operating system code?

Process: % User Time and Process: % Privileged Time sum to Process: % Processor Time.