Windows Performance Analyzer: How to Use WPA
In this article
Windows Performance Analyzer (WPA) is a powerful tool for diagnosing system slowdowns, high CPU usage, and application hangs by visualizing data collected from Windows Event Tracing. It allows you to pinpoint exactly which process or driver is consuming resources at any given moment. To use it effectively, you must first capture performance data using the Command Line Interface for ETW (CLI for ETW), as WPA is strictly a viewer and cannot record data on its own.
What You'll Need
- A Windows PC running Windows 10 (version 1809 or later) or Windows 11. Note that WPA is included by default in these modern versions; older versions required downloading the Windows Assessment and Deployment Kit (ADK).
- Administrator privileges are required to run the recording tools.
- The "CLI for ETW" tool, which is pre-installed with Windows 10/11 but may need to be enabled via PowerShell if missing.
- A specific scenario to reproduce (e.g., launching a game, opening a heavy application, or waiting for a freeze) so you have meaningful data to analyze.
Step-by-Step
- Prepare your environment: Close unnecessary applications to reduce background noise in your trace. Ensure you are logged in with an administrator account, as tracing requires elevated permissions.
- Open the recording tool: Press Win + R, type
cmd, then press Ctrl + Shift + Enter to open Command Prompt as Administrator. Alternatively, search for "Event Tracing for Windows" in the Start menu. - Start the trace: In the Command Prompt, type the following command and press Enter:
wpr -start GeneralProfile. This begins recording CPU, memory, disk, and network activity. The screen may flicker briefly, indicating the recording has started. - Reproduce the issue: Perform the actions that cause the performance problem (e.g., launch the slow application or wait for the lag). Keep the trace running for at least 30 seconds to ensure sufficient data is captured. If the issue is intermittent, repeat the action multiple times during this window.
- Stop the trace: Return to the Command Prompt window and type
wpr -stop C:\Users\YourUsername\Desktop\trace.wprz. Replace "YourUsername" with your actual Windows username. This saves the raw data file to your desktop. You can change the path if desired, but ensure you have write access to that location. - Launch Windows Performance Analyzer: Open the Start menu and search for "Windows Performance Analyzer". Click the application to launch it. If you do not see it, search for "wpa.exe".
- Load the data: In WPA, go to
File > Openand select the.wprzfile you just saved. WPA will automatically parse the data and load the default view, which typically shows a CPU Usage (Sampled) graph. - Analyze the graphs: Look for spikes in the CPU graph that correspond to the time you reproduced the issue. Hover over the peaks to see tooltips with details about what was happening at that exact millisecond. Use the timeline slider at the bottom to zoom into specific moments of interest.
- Identify the culprit: Click on the "Process Name" column in the lower pane to sort processes by CPU usage. The process responsible for the spike will appear at the top. Right-click on a process name and select "Show Call Stack" to see the specific code paths or functions consuming the CPU cycles.
- Save your analysis: Once you have identified the issue, you can save the WPA configuration (
.wpaprofile) to reuse the same views for future traces, or export the graph as an image for reporting.
Common Mistakes
One of the most frequent errors is failing to stop the trace properly, which results in a corrupted .wprz file that WPA cannot open. Always ensure the wpr -stop command completes successfully and returns no errors. Another common mistake is analyzing a trace without a clear baseline; try to record a short "idle" trace first to understand what normal resource usage looks like on your specific machine. Additionally, users often overlook the importance of matching the trace duration to the issue—if a freeze lasts 5 seconds, a 60-second trace might dilute the relevant data, making it harder to spot.
Tips
Use the GeneralProfile setting for most general troubleshooting needs, as it captures a broad range of system activities without overwhelming storage. If you are debugging a specific driver crash, switch to DriverProfile for more detailed kernel-level data. Always check the "CPU Usage (Precise)" view if you suspect a single core is maxed out, as the sampled view can sometimes miss very brief spikes. Finally, use the "Compare" feature in WPA to overlay two different traces side-by-side, which is incredibly useful for verifying if a software update actually resolved a performance bottleneck.
Troubleshooting
If WPA fails to open the .wprz file, verify that the file size is greater than 0KB; a zero-byte file indicates the trace was not recorded correctly. Check the Command Prompt for error messages during the -stop phase, such as permission denied, which means you did not run the CMD as Administrator. If the graphs appear empty or flat, ensure that the "Enable CPU Sampling" option was active when you started the trace. For persistent issues, try restarting your computer to clear any lingering tracing sessions that may be locking system resources. If WPA itself crashes, ensure your Windows OS is fully updated, as compatibility patches are released regularly.
Frequently Asked Questions
Can I use WPA on Windows 7?
No, WPA is not included by default in Windows 7. You must download and install the Windows Assessment and Deployment Kit (ADK) to get the standalone version of WPA for older operating systems.
Does WPA record audio or video?
No, WPA records system telemetry data such as CPU, memory, disk I/O, and network packets. It does not capture screen content, audio streams, or user keystrokes for privacy and security reasons.
How long should I record a trace?
For most issues, 30 to 60 seconds is sufficient. Record only as long as necessary to capture the problematic event plus a few seconds before and after to provide context.
Is WPA safe to use?
Yes, WPA is a legitimate Microsoft diagnostic tool. It does not modify your system files or settings; it only reads existing event logs and performance counters to generate reports.
Why is my CPU usage graph flat?
This usually happens if CPU sampling was disabled during the trace setup. Ensure you used wpr -start GeneralProfile or explicitly enabled sampling in the CLI for ETW interface.
Can I share my trace with Microsoft Support?
Yes, you can send the .wprz file to technical support. However, note that the file can be large (hundreds of MBs), so you may need to compress it or use a cloud sharing service.