MSDN Documentation

Windows SDK Tools

Windows Performance Analyzer

The Windows Performance Analyzer (WPA) is a powerful tool for analyzing performance data collected by Windows Performance Recorder (WPR) or other tracing tools. It allows you to visualize system activity, identify bottlenecks, and understand the root causes of performance issues.

Key Features

  • Advanced graphical visualization of performance data.
  • Detailed analysis of CPU usage, disk I/O, network activity, and more.
  • Support for various event tracing formats (ETW).
  • Customizable reports and views for specific analysis needs.
  • Integration with Windows Performance Recorder (WPR).

Getting Started

To begin analyzing performance data, you first need to collect a trace. Windows Performance Recorder (WPR) is the recommended tool for this:

  1. Launch Windows Performance Recorder (part of the Windows SDK).
  2. Select the desired profiling scenarios (e.g., CPU, Disk I/O, Power).
  3. Click "Start" to begin recording.
  4. Reproduce the performance issue you are investigating.
  5. Click "Save" to stop recording and save the trace file (.etl format).
  6. Open the saved .etl file in the Windows Performance Analyzer.

Common Analysis Scenarios

CPU Usage Analysis

WPA excels at pinpointing CPU-intensive processes and threads. You can use the CPU Usage (Sampled) and CPU Usage (Precise) views to:

A typical CPU usage analysis might involve looking at the CPU Usage (Sampled) graph, filtering by process, and then examining the CPU Usage (Precise) or Function Summary tables for detailed information.

Disk I/O Analysis

Understand disk performance bottlenecks with views like:

These views help you identify which processes are performing heavy disk operations and which files are being accessed most frequently.

Memory Analysis

Investigate memory usage patterns using:

These can help detect memory leaks or excessive memory allocation by applications.

Advanced Techniques

WPA offers advanced features for in-depth analysis:

Example Command Line Usage (for WPR)

You can also use WPR from the command line to start and stop traces:

wpr.exe -start CPU -filemode -start Disk.FileIO -filemode -start USB -filemode -start Power -filemode -start GPU -filemode -start Microsoft-Windows-Kernel-Process -filemode -start Microsoft-Windows-Kernel-Thread -filemode -start Microsoft-Windows-Kernel-Memory -filemode -start Microsoft-Windows-Kernel-FileIO -filemode -start Microsoft-Windows-Kernel-Registry -filemode -start Microsoft-Windows-Kernel-Network -filemode -start Microsoft-Windows-Kernel-Paging -filemode -start Microsoft-Windows-Kernel-General -filemode -start Microsoft-Windows-Kernel-WDF -filemode -start Microsoft-Windows-Kernel-ACPI -filemode -start Microsoft-Windows-Kernel-Power -filemode -start Microsoft-Windows-Kernel-Io -filemode -start Microsoft-Windows-Kernel-Pnp -filemode -start Microsoft-Windows-Kernel-DevicePower -filemode -start Microsoft-Windows-Kernel-Hyper-V -filemode -start Microsoft-Windows-Kernel-Hyper-V-Hypervisor -filemode -start Microsoft-Windows-Kernel-Hyper-V-Power -filemode -start Microsoft-Windows-Kernel-Hyper-V-System -filemode -start Microsoft-Windows-Kernel-Hyper-V-Processor -filemode -start Microsoft-Windows-Kernel-Hyper-V-Gpt -filemode -start Microsoft-Windows-Kernel-Hyper-V-Vproc -filemode -start Microsoft-Windows-Kernel-Hyper-V-Vmswitch -filemode -start Microsoft-Windows-Kernel-Hyper-V-Netvsc -filemode -start Microsoft-Windows-Kernel-Hyper-V-GpuPassthrough -filemode -start Microsoft-Windows-Kernel-Hyper-V-GpuVirtualization -filemode -start Microsoft-Windows-Kernel-Hyper-V-VmBuddy -filemode -start Microsoft-Windows-Kernel-Hyper-V-Guest-Transition -filemode -start Microsoft-Windows-Kernel-Hyper-V-RemoteFX -filemode -start Microsoft-Windows-Kernel-Hyper-V-VM-Bus -filemode -start Microsoft-Windows-Kernel-Hyper-V-SCSIport -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Device -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Config -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Data -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Host -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Guest -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Packet -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Channel -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Interrupt -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-VpSrv -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Controller -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Port -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Interface -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Ctl-Channel -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Ctl-Device -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Ctl-Port -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Ctl-Data -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Ctl-Interrupt -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Ctl-Packet -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Ctl-Interface -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Ctl-Channel-Data -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Ctl-Channel-Interface -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Ctl-Channel-Packet -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Ctl-Channel-Port -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Ctl-Channel-Device -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Ctl-Channel-Interrupt -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Ctl-Channel-Packet-Data -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Ctl-Channel-Packet-Interface -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Ctl-Channel-Packet-Port -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Ctl-Channel-Packet-Device -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Ctl-Channel-Packet-Interrupt -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Ctl-Channel-Packet-Data-Interface -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Ctl-Channel-Packet-Port-Interface -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Ctl-Channel-Packet-Device-Interface -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Ctl-Channel-Packet-Interrupt-Interface -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Ctl-Channel-Packet-Data-Port -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Ctl-Channel-Packet-Device-Port -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Ctl-Channel-Packet-Interrupt-Port -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Ctl-Channel-Packet-Data-Interface-Port -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Ctl-Channel-Packet-Device-Interface-Port -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Ctl-Channel-Packet-Interrupt-Interface-Port -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Ctl-Channel-Packet-Data-Port-Interface -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Ctl-Channel-Packet-Device-Port-Interface -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Ctl-Channel-Packet-Interrupt-Port-Interface -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Ctl-Channel-Packet-Data-Interface-Port-Interface -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Ctl-Channel-Packet-Device-Interface-Port-Interface -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Ctl-Channel-Packet-Interrupt-Interface-Port-Interface -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Ctl-Channel-Packet-Data-Port-Interface-Port -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Ctl-Channel-Packet-Device-Port-Interface-Port -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Ctl-Channel-Packet-Interrupt-Port-Interface-Port -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Ctl-Channel-Packet-Data-Interface-Port-Interface-Port -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Ctl-Channel-Packet-Device-Interface-Port-Interface-Port -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Ctl-Channel-Packet-Interrupt-Interface-Port-Interface-Port -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Ctl-Channel-Packet-Data-Port-Interface-Port-Interface -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Ctl-Channel-Packet-Device-Port-Interface-Port-Interface -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Ctl-Channel-Packet-Interrupt-Port-Interface-Port-Interface -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Ctl-Channel-Packet-Data-Interface-Port-Interface-Port-Interface -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Ctl-Channel-Packet-Device-Interface-Port-Interface-Port-Interface -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Ctl-Channel-Packet-Interrupt-Interface-Port-Interface-Port-Interface -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Ctl-Channel-Packet-Data-Port-Interface-Port-Interface-Port-Interface -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Ctl-Channel-Packet-Device-Port-Interface-Port-Interface-Port-Interface -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Ctl-Channel-Packet-Interrupt-Port-Interface-Port-Interface-Port-Interface -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Ctl-Channel-Packet-Data-Interface-Port-Interface-Port-Interface-Port-Interface -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Ctl-Channel-Packet-Device-Interface-Port-Interface-Port-Interface-Port-Interface -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Ctl-Channel-Packet-Interrupt-Interface-Port-Interface-Port-Interface-Port-Interface -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Ctl-Channel-Packet-Data-Port-Interface-Port-Interface-Port-Interface-Port-Interface-Port-Interface -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Ctl-Channel-Packet-Device-Port-Interface-Port-Interface-Port-Interface-Port-Interface-Port-Interface -filemode -start Microsoft-Windows-Kernel-Hyper-V-VMBus-Ctl-Channel-Packet-Interrupt-Interface-Port-Interface-Port-Interface-Port-Interface-Port-Interface -filemode -onfile PerfTrace.etl -num 10 -buffer "Large"

Then stop recording with:

wpr.exe -stop PerfTrace.etl

Note: The specific profiles and options available may vary based on your Windows version.