Performance Monitoring
Performance monitoring refers to the collecting, viewing, and analyzing of performance data such as processor usage, disk usage, memory usage, and other statistics for a computer. Performance monitoring can involve displaying performance data in real time or collecting performance data and saving it in log files that can be analyzed later.
Performance monitoring is based upon an always-present, always-on instrumentation infrastructure in Windows by which numeric information concerning operating system and application performance data is grouped into categories, counters, and instances. This performance data can be accessed in the following ways:
- Using the Performance Monitor snap-in in Microsoft Management Console (MMC)
- Using Windows PowerShell scripts
- Using native and managed application programming interfaces (APIs) programmatically
The Performance Monitor snap-in, shown in Figure below, is typically used for baselining system behavior, monitoring resource utilization, and troubleshooting performance issues involving the operating system and applications. The Windows 7 version of Performance Monitor is essentially the same as that found in the Windows Vista operating system, which improved upon earlier versions of Windows by providing better visualizations, easier navigation, and more detailed control over the collection and display of performance data.
Specifically, the following enhancements to Performance Monitor were introduced in Windows Vista:
- Drag and drop This feature allows a user to drag any Performance Monitor-related
file into the display area to open the file. The Performance Monitor display changes to
reflect the actions relevant to the opened file type. Supported file types include:
- Templates (html, xml).
- Logs (blg).
- Comma-separated or tab-separated value files (csv, tsv).
You can also drag multiple binary log files (*.blg) into the Performance Monitor window. However, you cannot drag multiple .html, .xml, .csv, or .tsv files; attempting to do so will generate an error.
- Time Range Control Each performance counter data sample has a timestamp that
identifies when the data was collected. In previous versions of Performance Monitor,
users needed to view and change the properties of a loaded log file to adjust the log's
visible timeframe (on the x-axis). When the graph is a line chart, time labels are now
automatically displayed along the horizontal time axis in the main Performance
Monitor view.
The timestamps for the first and last samples are always displayed. Because of limited x-axis space, time labels cannot be displayed for all data points. The displayable time labels are determined based on the sample interval time and the currently visible time range. The actual number of time labels displayed varies as the size of the System Monitor graph window is resized or if the chart area scale is changed. - Legend Control The Performance Monitor Legend Control added in Windows Vista
provides two features that allow easier, more detailed control of the displayed performance
counters:
- Multiple counter selection
- Show/Hide counters
Previously, performance counter operations, such as changing the scale factor, could be performed only on a single counter, and the only way to hide a performance counter was to delete it from the System Monitor view. Now you can simultaneously select multiple counters for manipulation. The possible operations on multiple selected counters are Show Selected Counters, Hide Selected Counters, or Scale Selected Counters. You can select multiple counters in the legend, report, or chart window using standard keyboard or mouse functions (Ctrl+left-click or Shift+left-click). The selected counter items will be highlighted for ease of identification.
You can also temporarily hide performance counters from a graph or report view using the menu options. This provides a convenient method for quickly hiding a counter to make a graph more readable. To hide or show counters, users can either select or clear the Show check box next to the desired counters, or they can select the counter (or counters) and use the shortcut menu to show or hide the selected counters. Note that the Show and Hide options do not apply to the report view. Previously, the only way to remove a performance counter from the current view was to delete it from the System Monitor legend.
- Scale to Fit Previously in the Windows XP operating system, because the values of
some performance counters might have exceeded the current graph scale, not all of
the data was visible and changing the graph or counter scales required several steps.
The Scale to Fit feature added in Windows Vista allows the scaling of performance data
to the current graph view on a counter-by-counter basis without changing the overall
graph scale or performing numerous steps to change a particular counter's scale. The
Scale to Fit feature is applicable to line and bar types of charts for both real-time and
logged data sources.
When a user selects counters and applies the Scale to Fit feature to them, Performance Monitor automatically scales the selected counters to the current graph view based on the range of values for the counters. The view is updated to draw the graph with the new scale factor so that the values fall within the graph's current vertical minimum and maximum ranges. The Scale to Fit feature does not change the graph's vertical minimum or maximum ranges. You can determine the current scale factor for each counter from the Scale column in the counter list pane.
To use the Scale to Fit feature, select the counters you want to modify, right-click the counters at the bottom of Performance Monitor, and select Scale Selected Counters. When you use the Scale to Fit feature, you can select multiple counters by using Ctrl+left-click to individually select multiple counters or by using Shift+left-click to highlight a contiguous range of counters. Performance Monitor uses an algorithm to determine the best scale factor for each selected counter based on its current range of values and the graph scale. It then recalculates the data sample values and displays them in the graph, using the new scale factor.
Note that because the vertical minimum and maximum ranges are configurable and scaling uses a factor of 10, it is possible that the selected counter data still cannot be displayed within the configured vertical graph range, depending on the selected counter's values. - Add Counters dialog box The Add Counters dialog box in Performance Monitor
has been redesigned to improve usability based on user feedback. The design of the
previous Add Counters dialog box made it difficult for users to confirm the performance
counters that were being added. The new interface has a
hierarchical design that allows you to instantly see the counters that are being added
to a log.
The Add Counters window contains a list of available objects on the left side just below the Computer Name field. You can view and select the counters for the selected object by clicking the down arrow to the right of the object name. The instances associated with the selected object are displayed in the Instances Of Selected Object list. You can add any combination of objects, counters, and instances by clicking Add with the desired elements highlighted. The added elements are immediately displayed in the Added Counters list. The Objects, Counters, and Instances windows support multiselect, so that you can select multiple items by using standard keyboard or mouse functions (Ctrl+left-click or Shift+left-click) and then adding to the log with one click of the Add button.
A search function is also available when the All Instances option is present for a performance object. The search feature provides you with the ability to search the available instances for the selected object. The search results will be grouped into the <All searched instances> instance item; you can add them to the log by clicking Add with the <All searched instances> item selected. - Zoom The new zoom feature in Performance Monitor provides you with the ability
to easily view logged data in more detail. (You cannot zoom in to real-time performance
data.) Users can select a time range that they want to view in more detail and
then use the new Zoom To shortcut menu item to clear the current log view and
replace it with the zoomed time range. Fewer samples are displayed in the zoomed
time range, but you can obtain more detail from the samples that are displayed. You
can use the following methods to select a range of time to zoom in on:
- Using the left mouse button, click the graph to select the first time point, drag the mouse to the second time point, and then release the mouse button. The selected time range will be shadowed in the graph view. Click the right mouse button to open the shortcut menu and then select Zoom To.
- Use the time range slider control (visible under the graph) to select the desired time range. You can use each end of the slider control to change the time window you want to display. The selected time range will be shadowed in the graph view. Click the right mouse button to access the shortcut menu and then select Zoom To.
- Compare By starting Performance Monitor using the perfmon /comp command, a Compare feature can be used to overlay multiple log files for relative comparison. An adjustable level of transparency is added to the logs being compared so that you can see through the logs that have been overlaid. This feature is useful if, for example, a user wants to compare server-resource utilization between 8:00 A.M. and 9:00 A.M. over a week-long period. The Compare feature is discussed in more detail in the section titled "Comparing Performance Monitor Logs" later in this tutorial.
- Tool tips Tool tips are displayed when you pause the mouse on a data element in the Performance Monitor graph. The tool tips will show performance-counter data for the element nearest to the mouse pointer. This will be either the previous data point or the next data point, whichever is closest to the mouse pointer. Tool tips appear only for visible chart data elements.
- Time-based algorithms Time-based sample collection allows you to collect performance-counter data based on a given time range. Previously, if a logging session failed to collect data for some period of time, the assumption was that all of the data was continuously collected and showed no missing data points. This resulted in the display of inaccurate data. The new time-based algorithms display gaps in graphs when a log file has missing samples. This feature does not introduce any new chart type.
- Transportable configuration files In Microsoft Windows 2000, Windows XP, and Windows Server 2003 operating systems, the configuration of each performance log or alert can be saved to an Hypertext Markup Language (HTML) file, edited to change the computer name, and used as a template to create a log for another computer. Beginning with Windows Vista, the default configuration file format is changed to Extensible Markup Language (XML).
- End of File command Performance Monitor previously used CreateProcess to execute an End of File command to start the specified process when a log ended. To improve security and allow for flexibility of the execution context (credentials), this feature has been replaced by the ability to start an existing Task Scheduler job when a log file completes.
In this tutorial:
- Windows 7 Desktop Maintenance
- Performance Monitoring
- Improvements to Performance Monitoring in Windows 7
- Using Performance Monitor
- Real-Time Performance Monitoring
- Performance Monitor Logging
- Creating a Data Collector Set
- Configuring a Data Collector Set
- Using Data Manager to View Performance Data
- Starting and Stopping Data Logging
- Viewing Performance Data
- Comparing Performance Monitor Logs
- Performance Monitor User Rights
- Remote Data Collection
- Using Windows PowerShell for Performance Monitoring
- Resource Monitor
- Overview Tab
- CPU Tab
- Memory Tab
- Disk Tab
- Network Tab
- Reliability Monitor
- How Reliability Monitor Works
- Windows Performance Tools Kit
- Event Monitoring
- Understanding the Windows Event Architecture
- Channels
- Improvements to Event Monitoring in Windows 7
- Using Event Viewer
- Understanding Views
- Viewing Event Logs
- Saving Event Logs
- Configuring Event Subscriptions
- Considerations for Workgroup Environments
- Creating a New Subscription
- Using the Windows Events Command-Line Utility for Event Monitoring
- Using Windows PowerShell for Event Monitoring
- Using Task Scheduler
- Improvements to Task Scheduler in Windows 7
- Understanding Tasks
- Understanding the Task Scheduler Architecture
- Understanding Task Scheduler Security
- Credentials Management
- Securing Running Tasks
- Understanding AT and Task Scheduler v1.0 Compatibility Modes
- Understanding the Task Scheduler Snap-in
- Understanding Default Tasks
- Creating Tasks
- Defining Triggers
- At Startup Trigger
- On Connection To AND Disconnect From User Session Triggers
- On Workstation Lock AND Unlock Triggers
- Defining Actions
- Defining Conditions
- Defining Settings
- Managing Tasks
- Viewing History
- Using SchTasks.exe for Creating and Managing Tasks
- Task Scheduler Events
- Troubleshooting Task Scheduler
- Tasks Won't Run If the Service Is Not Started
- The Task Will Run Only When a Certain User Is Logged On
- The Task Action Failed to Execute
- Interpreting Result and Return Codes
- Understanding the Windows System Assessment Tool
- Understanding WinSAT Assessment Tests
- Examining the WinSAT Features Assessment
- Running WinSAT from the Command Line
- Understanding WinSAT Command Exit Values
- Running WinSAT Using Performance Information and Tools
- System Capabilities Section
- OEM Upsell And Help Section
- Understanding Windows Error Reporting
- Overview of Windows Error Reporting
- How WER Works
- Store Management System
- ReportArchive Folder
- WER Service
- Understanding the Error Reporting Cycle
- Understanding WER Data
- Configuring WER Using Group Policy
- Configuring WER Using the Action Center