Thursday, July 31, 2008

Understanding Performance Tab of Windows Task Manager

Many time we feel measuring performance of application manually is bit difficult, but in real sense it is not. There could be many possible ways to measure performance of application manually but the technique I am going to explain here is bit easy and handy.

If we have Windows OS then we can open Task manager (Right Click on Windows Task Bar and click on Task manager or press ALT+CTRL+DEL key and click on Task manager) and Open performance TAB, as shown in picture below -


The Performance tab displays a dynamic overview of your computer's performance. Click one of the following for more information:

CPU Usage

A graph indicating the percentage of time the processor is working. This counter is a primary indicator of processor activity. View this graph to see how much processing time you are using. If your computer seems to be running slowly, this graph could display a higher percentage.

CPU Usage History

A graph showing how busy the CPU has been over time. The sampling displayed in the graph depends on the value you select for the Update Speed on the View menu. Updates occur with these possible values: High = twice per second; Normal = once every two seconds; Low = once every four seconds; Paused = display doesn't automatically update.

PF Usage

The amount of paging file being used by the system. If your computer is running near the maximum, you can increase the page file size.

Page File Usage History

Graph depicting the amount of page file used over time. The sampling displayed in the graph depends on the value you select for the Update Speed on the View menu.

Totals

Totals for the number of handles, threads, and processes running on the computer.

Commit Charge (K)

Memory allocated to programs and the operating system. Because of memory copied to the paging file, called virtual memory, the value listed under Peak may exceed the maximum physical memory. The value for Total is the same as that depicted in the Page File Usage History graph.

Physical Memory (K)

The total physical memory, also called RAM, installed on your computer. Available represents the amount of free memory that is available for use. The System Cache shows the current physical memory used to map pages of open files.

Kernel Memory (K)

Memory used by the operating system kernel and device drivers. Paged is memory that can be copied to the paging file, thereby freeing the physical memory. The physical memory can then be used by the operating system. Nonpaged is memory that remains resident in physical memory and will not be copied out to the paging file.

However, if you click on View->Show Kernel Times you can get information about the CPU Usage Time on the System (Kernel).


The Red Line displays Kernel CPU usage, while the Green Line displays total CPU usage.

This means that if your trying to figure out how much CPU your current program is using you take the Green (Total) CPU Usage - Red (System) CPU Usage = Current Application Usage.

Also if you Double Click on the Graph it will display in the full window.

Double Click the graph to go back to the previous view

To check how much CPU a Perticular process (you shall know the name of the process you application runs) is taking you can siply open the Processes TAB


Here you can check User vise list of processes running at a perticular time and can also check how much CPU Usage, CPU time and Memory Usage a perticular Process is taking, not only this there are many other columns which can be added in this view.

You can configure which columns are displayed (View->Select Columns), and rearrange their order by dragging the column headers in the usual way. On XP, you can decide whether to show other user's processes or just your own.

Click on View -> Select Column...

and check/unchecked the column names you want to see in the view -


The 'image name' is the name of the executable file used when the process was created; this name is popularly referred to as the name of the process, though it's not really. (Why 'image'? Because programmers used the word 'image' for 'memory image file' long before it was possible to put pictures on a computer without a defense-department-sized budget).

There are two exceptions to this, the System Idle Process (pid 0) and the System process (pid 4). These are wired into the kernel, and do not have corresponding image files. They don't have image names either, so various tools such as Task Manager make up names, so you might see different names in different tools.

The System Idle Process consumes all the CPU time that no-one else wants. If no other process is ready to run (on a particular CPU), the kernel will run the idle process.

The System process contains threads used by the OS kernel for 'background' functions. For example, the working set trimmer, which may reclaim physical memory from some processes, runs as a thread in the System process. The System process may also have threads used by some device drivers to do work outside the normal path of operation. (If the System process is using a huge amount of CPU for an extended time, it usually means some device driver is to blame).

Most of the columns of data are adequately explained by Task Manager's help, so I won't repeat the information here. The memory-related data, however, could probably use extra clarification.

The Mem Usage column shows the current working set size for the process, which is to say, the amount of physical memory the process is currently allocated. Three things need to be said here: firstly, this is only somewhat related to "how big the process is". The process is probably larger than that; the OS's job is to keep only those pages in physical memory that it is useful to have in physical memory. Secondly, the number can get smaller, if the OS decides to take some physical memory away from the process ('working set trimming'), which it will do if it has some other use for the memory. Lastly, you can't add up all the numbers and get the total used by all processes; some of the physical memory is shared by more than one process.

The VM Size column shows the number of Private Bytes of virtual memory owned by the process. As always, 'virtual memory' does not necessarily mean disk or RAM; it could be either, or neither.

Further notable aspects of Task Manager:

PID.

The Process ID (PID) is listed next to the process, allowing you to execute the KILL command at the command line to terminate an out-of-control process. Of course you can more easily accomplish the same thing by clicking the End Process button.

Set Priority.

Right-clicking a process and selecting Set Priority allows you to set the processing priority for the process from Real time to Low.

Set Affinity.

By default, activity is distributed over multiple processors in Windows 2000 without any involvement from you. This is a technique known as Symmetrical Multiprocessing (SMP). However, you can assign a process to a specific processor by selecting the Set Affinity menu option displayed on the secondary menu when you right click a process. This allows you to invoke Asymmetrical Multiprocessing just like the good old mainframe days.

Customize.

Choosing Select Columns on the View menu when the Processes tab is displayed in Task Manager allows you to select many more reporting columns (As Show in Above Pictures). If you click OK, the Processes tab reflects many more columns of information.

1 comment:

  1. It's Really a Good Approach for Performance Testing ,if we don't have any performance Tool !!

    ReplyDelete