Windows 7 / Getting Started

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.

The Performance Monitor snap-in

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.
    To zoom out, reset the time range using the slider control and then select Zoom To again to zoom to the currently selected time range. You can also use the left and right arrows on the slider control to scroll the time range in the graph.
  • 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.
[Contents] [Next]

In this tutorial:

  1. Windows 7 Desktop Maintenance
  2. Performance Monitoring
  3. Improvements to Performance Monitoring in Windows 7
  4. Using Performance Monitor
  5. Real-Time Performance Monitoring
  6. Performance Monitor Logging
  7. Creating a Data Collector Set
  8. Configuring a Data Collector Set
  9. Using Data Manager to View Performance Data
  10. Starting and Stopping Data Logging
  11. Viewing Performance Data
  12. Comparing Performance Monitor Logs
  13. Performance Monitor User Rights
  14. Remote Data Collection
  15. Using Windows PowerShell for Performance Monitoring
  16. Resource Monitor
  17. Overview Tab
  18. CPU Tab
  19. Memory Tab
  20. Disk Tab
  21. Network Tab
  22. Reliability Monitor
  23. How Reliability Monitor Works
  24. Windows Performance Tools Kit
  25. Event Monitoring
  26. Understanding the Windows Event Architecture
  27. Channels
  28. Improvements to Event Monitoring in Windows 7
  29. Using Event Viewer
  30. Understanding Views
  31. Viewing Event Logs
  32. Saving Event Logs
  33. Configuring Event Subscriptions
  34. Considerations for Workgroup Environments
  35. Creating a New Subscription
  36. Using the Windows Events Command-Line Utility for Event Monitoring
  37. Using Windows PowerShell for Event Monitoring
  38. Using Task Scheduler
  39. Improvements to Task Scheduler in Windows 7
  40. Understanding Tasks
  41. Understanding the Task Scheduler Architecture
  42. Understanding Task Scheduler Security
  43. Credentials Management
  44. Securing Running Tasks
  45. Understanding AT and Task Scheduler v1.0 Compatibility Modes
  46. Understanding the Task Scheduler Snap-in
  47. Understanding Default Tasks
  48. Creating Tasks
  49. Defining Triggers
  50. At Startup Trigger
  51. On Connection To AND Disconnect From User Session Triggers
  52. On Workstation Lock AND Unlock Triggers
  53. Defining Actions
  54. Defining Conditions
  55. Defining Settings
  56. Managing Tasks
  57. Viewing History
  58. Using SchTasks.exe for Creating and Managing Tasks
  59. Task Scheduler Events
  60. Troubleshooting Task Scheduler
  61. Tasks Won't Run If the Service Is Not Started
  62. The Task Will Run Only When a Certain User Is Logged On
  63. The Task Action Failed to Execute
  64. Interpreting Result and Return Codes
  65. Understanding the Windows System Assessment Tool
  66. Understanding WinSAT Assessment Tests
  67. Examining the WinSAT Features Assessment
  68. Running WinSAT from the Command Line
  69. Understanding WinSAT Command Exit Values
  70. Running WinSAT Using Performance Information and Tools
  71. System Capabilities Section
  72. OEM Upsell And Help Section
  73. Understanding Windows Error Reporting
  74. Overview of Windows Error Reporting
  75. How WER Works
  76. Store Management System
  77. ReportArchive Folder
  78. WER Service
  79. Understanding the Error Reporting Cycle
  80. Understanding WER Data
  81. Configuring WER Using Group Policy
  82. Configuring WER Using the Action Center