What’s going on inside your computer right now? Is it running at its peak efficiency? Do you know how to find out? Fortunately, you can use the Windows NT Performance Monitor to track your server or workstation’s performance and fine-tune the system. In this Daily Feature article, I’ll give you the background on the Windows NT Performance Monitor.
Why use Performance Monitor?
Windows NT Performance Monitor is a graphical tool used for measuring the performance of a Windows NT server- or workstation-based machine. This utility lets you track variations in the use of system resources over time and set alerts on the use of specific resources. You can monitor a variety of objects, such as processors, memory, cache, threads, and processes.
Each object has counters associated with it that measure device usage, queue lengths, delays, and throughput and internal congestion information. There are approximately 350 counters that can be monitored. Many applications, such as SQL or SMS, provide additional objects and performance counters.
Performance Monitor also provides alerting, logging, and reporting capabilities. When you use Performance Monitor correctly, you will know when to add a faster hard drive, when to add more memory, or when to increase the size of Pagefile.sys.
When to use Performance Monitor
It is not a good idea to use Performance Monitor on a computer you have just set up. You should allow the computer to function on the network for a while so that it has time to settle in. It takes time for it to build browse lists, register with WINS, and be recognized by resources on the network.
Once a computer has been up and running for several days, you can start monitoring objects. If you feel that a computer is performing poorly, you may want to monitor specific objects. Performance Monitor should be run for several days during normal activity. Gathering information during times when you know the server will be used a lot will not give you a good overall picture of server performance.
Setting up counters
To select objects and counters, you must open Performance Monitor. To do so, go to Start | Programs | Administrative Tools | Performance Monitor. When you do, you’ll see the screen shown in Figure A.
There are four main windows in Performance Monitor that can be accessed from the View menu: Chart, Alert, Log, and Report. To start adding counters for objects, click the + button on the menu bar. This will pull up the Add To Chart window, as shown in Figure B.
|You can add objects to monitor on this window.|
From here, you can choose the computer, object, and counter that you wish to monitor. On the Object drop-down menu, you can select the object, such as Processor, Process, Memory, Page File, etc. Each object will have multiple counters with which it is associated. You can use the Help menu to get an explanation of the different counters.
Each object has a default counter which is the counter that is normally monitored for that object. It is important that you are careful when choosing the objects and counters you want to monitor, as it is easy to confuse the Process and the Processor objects. The Process object represents a running program and tracks how much of each system resource the process is using. The Processor object represents the CPU, which is a system resource. Both of these objects have the %Processor Time counter.
As soon as you choose an object and counter, click the Add button. You will notice that data from the object is collected right away. You can also change the color, scale, width, and style of the chart for each counter. After you have chosen the counters you want to monitor, click Cancel. The counters are represented in the chart as lines as shown in Figure C. The legend at the bottom of the screen keeps track of each counter’s information.
Keep in mind that monitoring counters consumes resources in and of itself. Monitoring too many counters at once can cause your system’s performance to degrade.
When you want to use fresh values but keep the counters you’ve chosen, choose Clear Display from the Edit menu. To delete a selection, select the legend, log, or report item that you want to delete and choose Delete from the Edit menu.
Saving and exporting data
Data collected in Performance Monitor can be saved or exported to Tab Separated Value (TSV) files or Comma Separated Value (CSV) files. Once the data has been exported, you can pull the file into a spreadsheet or database to view or edit it. From the File menu, choose Export and select either Export TSV or Export CSV. Type the path and name for the file and click Save.
If you close Performance Monitor without saving, you will lose the data collected as well as the counters you have set up. To save settings for one Performance Monitor window, choose Save Settings from the File menu. Enter a filename and click Save. You will notice that the assigned filename appears in the status bar. If you have data in all four windows, you can save them all simultaneously by choosing Save Workspace from the File menu. Settings are stored in the following file types: chart (.pmc), alert (.pma), log (.pml). A report (.pmr) settings file or a workspace (.pmw) file contains settings for all four windows.
An Alert enables you to monitor the current performance of selected counters. When a counter exceeds a given value, the date and time of the event are recorded in the Alert window. To set an alert, choose Alert from the Options menu. This will change the current view to the Alert view. Click on the + button to add an alert.
You must choose a computer, object, and counter you want to monitor in the Add To Alert box as shown in Figure D. You must also provide the threshold value for the alert in the Alert If box. You can also run a program each time the alert happens or limit it to just the first time. The program can be a batch file that sends you a message or any other program you want to run. The Messenger Service must be running on the computer for which the alert is set.
|You can add alerts to your monitors.|
You can create a log file that will allow you to review the performance of counters. Log files contain detailed data for bottleneck detection or other detail. To create a log file, choose Log from the View menu. Click on the + button to bring up the Add To Log property box shown in Figure E. From here, you can choose to add an object to the log file. Repeat the process for each additional computer you want to monitor.
|You can add objects to a log file.|
To save the log selections in a settings file, choose Save Log Settings As from the File menu and enter a path and name for the file.
You can create reports that show current information on counter and instance values for selected objects. From the View menu, select Reports, and then click on the + button to bring up the Add To Report box as shown in Figure F.
|You can create Performance Monitor reports.|
The information is not presented as a graph, but in columns for each object. This report is dynamic and will continue to change as the object’s value changes. The value is an average over the last two data reads, which are separated by the length of the time interval. You can save the report settings in a settings file by choosing Save Report Settings As from the File menu. Enter a path and filename and click Save.
Commonly monitored counters and interpreting results
Each object has a default counter to which it is associated. The most commonly used objects and defaults are as follows:
- % Processor Time (processor)—This monitors the percentage of time that the processor is busy. If it is consistently more than 80%, consider upgrading your processor.
- Interrupts/Sec/Rate(processor)—This monitor tracks the number of requests for service from I/O devices. Dramatic increases may indicate a faulty hardware device. The lower the number of requests, the better.
- Processor Queue Length (processor)—This monitor traces the number of threads and required processor cycles. If the average of this number is greater than two, upgrade or add a processor.
- Average Disk Bytes/Transfer(physical disk)—Use this monitor to record the average bytes transferred during read or write. If it is greater than 20 Kb, you should get a faster hard drive.
- Page Faults/SecRequested(memory)—This shows the data that was not immediately available from the page file. A number consistently above zero indicates that too much memory has been allocated to an application.
- Available Bytes(memory)—This is the size of the virtual memory currently on the Zeroed, Free, and Standby lists. This should be at least 4 MB or more than 5% of memory.
- Page Reads/Sec (memory)—This is the number of times the disk was read to retrieve pages of virtual memory that are necessary to resolve page faults. High numbers indicate disk reads rather than cache reads.
- % Total Processor Time (system)—This is the time all of the processors on the system are busy executing idle threads. A number consistently above 85% indicates potential bottlenecks.
- Processor Queue Length(system)—This is the instantaneous length of the queue in units of threads. This should be less than two. Numbers consistently more than two indicate a processor bottleneck.
Performance Monitor is a tool that you should be familiar with as a system’s administrator. It can easily inform you when you need to add RAM, faster processors, or faster hard disks. It will allow you to set up thresholds for specific objects and then be alerted when your system exceeds those thresholds.
The authors and editors have taken care in preparation of the content contained herein but make no expressed or implied warranty of any kind and assume no responsibility for errors or omissions. No liability is assumed for any damages. Always have a verified backup before making any changes.