Subscribe to Windows IT Pro
April 01, 1998 12:00 AM

Troubleshooting NT Performance Monitoring

Windows IT Pro
InstantDoc ID #3023
Rating: (6)
Enhance your system's efficiency

This month, I'll explore issues related to Windows NT performance monitoring and resource use. I'll concentrate on the Performance Monitor (Perfmon) tool, but I'll also discuss other tools. Bottlenecks are common in performance monitoring, and you must prevent them to improve task and system performance.

Physicist Werner Heisenberg's uncertainty principle states that measuring both the exact position and the exact momentum of a particle at the same time is physically impossible. This principle also applies to performance monitoring. When you monitor performance you use additional CPU time; if you enable disk monitoring, you will experience slower disk access. However, the resource use is negligible and rarely affects your results.

If you plan to install new servers, you need to create a baseline performance monitor of the system for later comparison when the server is running other software or greater loads. You can thus compare the baseline performance to current use to detect large changes, such as high disk access.

Q: What tools can I use to monitor Windows NT performance?

NT supplies several performance monitoring tools. The Microsoft Windows NT Resource Kit (Workstation and Server) includes additional tools.

Task Manager (taskmgr.exe) lets you view all the processes and applications that are currently running, including the amount of memory and CPU time they're using. It also displays total memory use and CPU percentage use. This tool quickly evaluates your system's condition and identifies which processes are using memory and CPU space. To run Task Manager in NT 4.0, press Ctrl+Alt+Del and select Task Manager, or right-click the taskbar and select Task Manager.

Performance Monitor (Perfmon) is the best tool for evaluating resource use. Perfmon has exhaustive counters, and unlike Task Manager, it can log results to a file so that you can view and diagnose the results later. With the proper privileges, you can also monitor resource use for other computers on the network. Several software products add counters to Perfmon to augment the tool's monitoring abilities. You'll find Perfmon in the Administrative Tools program group. (For more information about performance monitoring, see "Related Articles in Windows NT Magazine," page 166.)

Process Explode (pview.exe) monitors all aspects of a process, such as the number of threads the process is using and the type and amount of committed mapped memory. This tool might interest developers. However, Process Explode is not useful for general users or administrators who want an overview of system resource use.

Quick Slice (qslice.exe) is a simple application that graphically displays the percentage of CPU that each active process uses. This tool gives only basic information, but it is useful for a quick graphical overview of per-process CPU use.

The resource kit includes Process Explode and Quick Slice. Several of Microsoft's Visual Development tools (e.g., Visual C++) include Process Explode.

Q: How can I identify a bottleneck on a Windows NT system?

Bottlenecks are common and can affect system performance. A bottleneck typically involves a system's memory, processor, disk storage system, network, or process. Bottlenecks might also involve more general I/O devices, such as serial ports and display. You can use Performance Monitor (Perfmon) to evaluate resources and their counters and determine which resource is causing the bottleneck.

Monitor the whole system rather than only the resource that you suspect is causing the problem. For example, you might view only the disk object and see high disk use, implying that you need faster disks or controllers. However, you might evaluate other usage statistics and discover that your disk access is high because of another problem. You might then evaluate memory use and find that the system paging is high (memory areas are being written and read to disk) because it lacks available physical memory; thus, instead of replacing disks, you must add memory.

Perfmon includes several counters for each resource. (Resources are also called objects. See Table 1 for counters that you can use to determine which resource on the system is causing the bottleneck.)

You can easily set up Perfmon to view resource use. From the Start menu, select Programs, Administrative Tools, Performance Monitor. Make sure Perfmon is in chart view (from the View menu, select Chart). You can then add counters to the chart by clicking the plus button or selecting Add To Chart from the Edit menu. A dialog box lets you choose objects and add counters, as Screen 1 shows. As you change the object choice, the counters change.

Select the object you want to monitor, select the relevant counters, and click Add. The chart will display the counters you have selected. By default, Perfmon updates counters once a second. To change this setting, select Chart from the Options menu and change the update time interval.

After you identify the resource that is causing the bottleneck, you need to identify the process that is causing the resource use. To monitor the resources that individual processes are using, select Process as the object and select the instance you want to monitor. You can use the instance option to view a list of all the processes that are running, because each process has an instance. You can monitor several of the main counters at a process level.

The Perfmon chart view requires you to constantly view the performance monitor to look for the guilty resource. An alternative is the log mode, which I explain in my next response.

Q: How do I set up a Performance Monitor log?

Usually you'll want to monitor performance over a long period and then review it. The log view lets you configure the required counters, and then Performance Monitor (Perfmon) sends the output to a file for later review.

Start Perfmon. From the View menu, select Log to see the log view. To add objects, click the plus button or select Add to Log from the Edit menu. A dialog box lets you select objects; you do not specify counters at this time.

From the Options menu, select Log. Select a location for Perfmon to store the log file in, and specify a filename. Select a disk that has sufficient free space, because the log might become large if you let it run for a long time. For example, if you monitor the objects LogicalDisk, Memory, Process, and System, the log grows by about 10KB each time Perfmon updates it. If you monitor every 10 seconds, after a 12-hour period the log will be about 40MB.

You must select the update interval. You might be tempted to choose once a second, but each reading uses resources. The default setting of 15 seconds is reasonable.

After you enter all the details, start the log. From the Options menu, select Log and click Start Log, but do not close Perfmon. After you collect enough data, stop the log. From the Options menu, select Log and click Stop Log.

To view the Perfmon log data, you must use the chart mode. From the View menu, select Chart. From the Options menu, select Data From. Then, click Log File and select the data source. Click OK. You can then add counters; however, you will see only the objects that you saved to the log.

You cannot simultaneously view a current activity chart and a log chart. To view both, you must run two Perfmon instances: one for the current chart, and one for the log chart.

Q: All my disk counter information in Performance Monitor is zero. Why?

When you monitor disks, you introduce overhead on the system that causes slower disk access. By default, the system does not activate the extra driver and timer that it needs. You can add disk counters, but they will not collect information. (They will display zeros.) The disks are not idle, but Performance Monitor (Perfmon) has no mechanism to collect data.

If you have software-enabled RAID volumes, you must install the new driver below ftdisk.sys (the fault-tolerant driver) in the I/O manager disk-driver stack so that you can gather information about the physical disks. If you are not using RAID, you must place the driver above the fault-tolerant driver.

To enable the extra driver, start a command session (cmd.exe). If you are not using RAID, enter

diskperf -y

If you are using RAID, enter

diskperf -ye

You will see the message Disk Performance counters on this system are now set to start at boot. This change will take effect after the system is restarted. You must then restart the computer.

To disable the disk-monitoring driver, enter

diskperf -n

After you reboot the computer, the driver will not start. The diskperf command changes the computer's Registry value for HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Diskperf\Start (0 * 0 for on; 0 * 4 for off).

Related Content:

ARTICLE TOOLS

Comments
  • Anonymous User
    7 years ago
    Mar 23, 2005

    yeah, perfmon objects can be disabled. you can
    reenable them via the registry but it's supposed
    to be a pain in the ***. try the exctrlst.exe
    tool instead - it gives you a nice UI to pick and enable/disable your perfmon objects.

    i think it comes on a MS resource kit, but there's probably copies up online somewhere.

    search usenet for more details.

  • Anonymous User
    7 years ago
    Mar 17, 2005

    Ive had the same problems!!!

    Does anyone have any answers?

  • Anonymous User
    7 years ago
    Feb 07, 2005

    lancerdood, I have the same issue on a Win2k box. Any ideas yet?

  • Lancerdood
    7 years ago
    Jan 07, 2005

    I have an issue with Windows Server 2003....the Process counter is missing in the Performance Monitor Object: listing....any clues???

  • Eric Rowen
    10 years ago
    Jan 21, 2002

    It would be useful to comment in the article that alerts are only possible when performance monitor is running.

    If you know of any way to get alerts to work withour perf Mon (e.g. the way disks alerts appear from servers short of space) then this would be VERY GRATEFULLY RECEIVED. A registry tweek maybe?

You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.