Most of the applications, services, protocols, and other elements found within NT automatically register themselves with Performance Monitor and make their objects and counters available for measurement. However, there are several instances in which you must use manual configuration to gain access to performance data. Three important areas in which this occurs are disk counters, network segment, and network interface.
The disk storage objects of PhysicalDisk and LogicalDisk are disabled by default. The act of measuring the performance of storage devices causes a degradation in their performance. This fact should encourage you to install the fastest drive controllers and physical disks you can afford. Then, when you need to monitor the disk subsystem, you do not sacrifice as much performance.
Tip: Ultimately, you must decide whether ongoing disk subsystem monitoring is more important than the slight decrease in operational response time. Although Microsoft cliams that the degradation is negligible, it recommends enabling these objects only when taking measurements.
Measuring performance on an object makes that object perform additional work. In most cases, the additional work has little or no effect on the objects normal activities. But in some cases, such as with disk objects and the Network Segment object (discussed later), the act of measuring causes enough additional work to adversely affect the objects performance. Thus, keep in mind that you can cause performance problems by taking just a single measurement, as well as by measuring many counters frequently. Its a little like the Heisenberg uncertainty principle. Although Heisenberg applied his principle to atomic objects speed and location, we can learn from applying his general concept to performance monitoring. To measure an objects performance, you must cause that object to perform additional work. Thus, you change the objects performance by measuring it. Your goal in performance monitoring is to cause the least amount of additional work while extracting the most information about the system.
The diskperf command line utility is used to enable and disable storage device measurement objects. This utility accepts the following command line parameters:
diskperf displays the current status of the disk performance counters
diskperf-y enables the disk counters
diskperf-ye enables the disk counters on mirror and stripe sets
diskperf-n disables the disk counters
The diskperf command can be issued from a Command Prompt or from the Start|Run command. However, the machine must be rebooted before Performance Monitor can use the enabled counters. Likewise, you must reboot to turn them off after issuing the disable command. When the disk counters are disabled, they show a value of zero.
The Network Segment objects counters are enabled when the Network Monitor Agent is installed. The Network Monitor Agent is a service that is installed on the Services tab of the Network applet in the Control Panel. When Performance Monitor measures counters from the Network Segment object, it places the network interface card (NIC) into promiscuous mode. This lets the NIC accept and process all network traffic. The Network Segment object should be used sparingly because an NIC in promiscuous mode operates less efficiently. The Network Segment object is used to detect broadcast and multicast storms and to track the amount of traffic received per second. These measurements can help determine whether a network segment is being flooded with traffic.
Tip: if your network performance seems slow, you can use the Network Segment objects counters to watch inbound traffic levels. Problem detection is often a worthwhile tradeoff for degraded performance due to the measurement of activity.
The Network Interface object is added to a TCP/IP-based system when the SNMP Service is installed. This service is installed through the Services tab of the Network applet in the Control Panel.
Other applications and services may have specialized objects or counters. In many cases, these are automatically installed into Performance Monitor. However, it is not uncommon for the counters/objects to require manual installation or at least manual enabling before measurements can occur. Consult the documentation from each major product to determine whether manual administration of performance objects and counters is required.
TYPES OF COUNTERS
Performance Monitor obtains its measurements by reading an objects counters. There are four types of counters: instantaneous, averaging, difference, and extensible. They simply provide different ways of measuring an objects activity.
Instantaneous displays only the most recent measurement.
Averaging displays the average of the last two measurements. The first value for an averaging counter is plotted only after the second measurement is made.
Difference displays the difference between the last two measurements. Only positive values are displayed; negative values are plotted as zero. Performance Monitor does not include any difference counters by default.
Extensible refers to all counters added by an installed application or service and counters added manually by a system administrator. Details on writing customized extensible counters can be found in the Win32 Software Development Kit. Performance Monitor does not include any extensible counters by default.
You really have little choice about what types of counters to use. Most of the built-in counters are Instantaneous counters, but there are a few averaging ones. Typically, the noninstantaneous counters are added to the system by an installed application, or you must create them.
For an exhaustive list of counters and detailed descriptions, the Microsoft Windows NT Server Resource Kit (with all its supplements) offers counters.hlp. This Windows Help file contains every Performance Monitor counter for every native NT application and service, plus information on many other counters that have been added via Microsoft products not shipped on the NT CD.
WORKING WITH PERFORMANCE MONITOR
The key to getting the most value from Performance Monitor is to understand its capabilities and its limitations. Once you have grasped these parameters, you can exploit them to accomplish your monitoring tasks. First and foremost, you need to become familiar and active with the configuration saving mechanism.
From any Performance Monitor view, you can save the configuration and option settings for just that view or for all views at once. A single view configuration file is stored as .pmc for Chart, .pma for Alert, .pml for Log, and .pmr for Report. The configuration file for all views at once, also known as the workspace, is .pmw. The Save commands from the File menu of the various views are used to save the configuration settings. Once such a file exists, it can be loaded using the Open command from the File menu. When a configuration file is loaded, all current configurations and settings are overwritten with those from the file.
Configuration files can be moved from one computer to another. All counters added from the original host computer focus on the new host computer. All counters from computers other than the original host retain their context on the new host computer. For example, If ServerA creates a .pmc file with the Processor: % Processor Time from ServerA and the Memory:Pages/sec from Server C, when the .pmc file is loaded on ServerB, the chart displays Processor: % Processor Time from ServerB and the Memory:Pages/sec from Server C.
Tip: Saving your view and/or workspace settings greatly reduces your setup and configuration times during all subsequent uses of Performance Monitor.
Saving and loading configuration files is a habit that you should form early on while working with Performance Monitor. Why? Usually, you will measure and examine the same counters every time you use Performance Monitor. Using configuration files eliminates the need to reselect counters and reconfigure the layout and presentation. Plus, configuration files can be moved from one system to another, once again eliminating the need to reconfigure the Performance Monitor interface. The counters local to the original machine become local counters for the new host, while all remote counters retain their remote system context.
Another important benefit of Performance Monitor is that multiple instances of it can be launched on the same computer at the same time. Each instance can read from the same log file; however, only a single instance can write to a log file (i.e., two or more instances of Performance Monitor must each write to a different log file). You can also use multiple instances to view realtime charting and reporting at the same time. To record multiple objects into multiple log files, you must launch a separate instance of Performance Monitor for each log file to be created. Performance Monitor can only write to a single log file at a time.
Although in most cases, the overhead and system load required to measure an objects performance is negligible, watching numerous counters over quick intervals can produce a negative effect on performance. Having objects perform too much additional work to provide measurements can adversely affect their performance.
Tip: Compare your measurements for suspect objects/counters over short intervals with measurements for longer intervals. If you see a significant difference, you must alter your measurement techniques. Significant difference is a value you choose that may vary from object to object or system to system. I typically use 3 percent because it is large enough value to let me differentiate between fluctuations in actual performance and measurement degradation. Your goal is to obtain as much useful performance information as you can while causing the least amount of performace degradation due to the measurement process.
Tip: When you generate a report, always plot the data first on the graph. Then use the graph to select the appropriate time for the report. Otherwise, you may accidentally select a spike or dip in performance that skews your reported data.
A report created in the Report View is either a snapshot of an instant in time or an averaged perspective on a time window. If you select a peak or valley for an instant report, the data will not accurately reflect reality. Likewise, if your time window includes a significant number of peaks and/or valleys, the averaging report may be skewed. Nevertheless, an averaging report is often a better perspective on reality than an instant report.
Performance Monitor launches itself with a blank Chart view window. If you create a Chart settings file named _Default.pmc and place it in the same directory as the Performance Monitor executable (i.e., \Winnt\System32), each time Performance Monitor launches it automatically loads with your default settings. This technique can simplify your use of Performance Monitor even more than just saving and reusing configuration files. It can automatically load the most commonly used configuration file each time you launch Performance Monitor. You can also drag and drop view and workspace settings files onto open instances of Performance Monitor. This lets you change configuration files with a single mouse movement.
Tip: Simplify your use of Performance Monitor by automatically loading your default settings and by refusing configuration files.
Recording a log file onto the drive being monitored causes more activity on that drive. It can skew your measurements beyond the effects of taking the measurements themselves.
Tip: When you log activity for a disk subsystem, dont record the log file onto the same drive that is being monitored.
Log management should be applied to other systems as well. For example, when you log network activity, dont store the log file on a network drive that uses the same interface, segment, or protocol. Again, you would be adding traffic or activity to the objects you are attempting to measure. Always look for ways to avoid making the objects being measured do additional work, whether its caused by the measurement tool, process, or related functions. If you fail to take into consideration the impact of the measurement and logging processes, you can shoot yourself in the foot by recording a system load increased due to measuring and logging over the same components.
Microsoft Learning Snack - Green IT Through Virtualization Many organizations face rising operating costs caused by excessive energy consumption. Virtualization and "Green IT" can help cut these costs. Get the information you need to bring Green IT savings to your business.
Order Your Fundamentals CD Today! Register today for your in-depth copy of one of three Fundamental CDs on the following topics – Exchange, SQL, and SharePoint.
Microsoft Learning Snack - Virtualization Basics With virtualization, computing components essentially become on-demand services, freeing each element of a system from the others. This short video explains the needs, benefits, and technologies behind virtualization.
Microsoft Learning Snack - Virtualization Basics With virtualization, computing components essentially become on-demand services, freeing each element of a system from the others. This short video explains the needs, benefits, and technologies behind virtualization.
Empower Your Processes with PowerShell 201 Paul Robichaux delves deep into PowerShell how-tos in 3 informative lessons, each followed by live Q&A—all on your own computer! Register today!
Microsoft Learning Snack - Green IT Through Virtualization Many organizations face rising operating costs caused by excessive energy consumption. Virtualization and "Green IT" can help cut these costs. Get the information you need to bring Green IT savings to your business.
New Release: Windows IT Pro Master CD 13 years of content archives, fast answers with advanced search tools, and full access to WindowsITPro.com—order today!