Slow PC? How to find out why and fix it
19th Dec 2010 | 12:00
Uncover and cure hidden PC performance problems
Why is my PC slow?: Getting started
From extended boot times to lengthy application launches and slow shutdowns, Windows is prone to all kinds of performance issues. If you're an experienced PC user then you'll know that the Task Manager and Event Viewer can offer help in diagnosing the problem, but that's about it. Anything more complicated and you're on your own.
It doesn't have to be that way – not if you install Microsoft's free Windows Performance Toolkit. This troubleshooting utility can record exactly what's happening on your PC, then produce detailed reports revealing the resource hogs that are holding it back – the key information you need to get your system running optimally.
The Windows Performance Toolkit is very useful, but for some reason Microsoft doesn't seem to want you to know about it. And while it was once available as a separate download, now it's only accessible as part of the Windows 7 Software Development Kit. Still, once you know the secret, it's not difficult to find and install.
Despite its name, the tool installs and runs happily on Vista as well. Head to the download page and grab the web installer. Launch this and you should get a choice of the components you'd like to install. Check 'Windows Performance Toolkit' in the 'Common Utilities' section (if you don't see that, check 'Win32 Development Tools') and allow the program to download and install your selected files.
If you selected the Windows Performance Toolkit directly during the setup process, it should now be available as a folder on the 'Start | All Programs' menu.
If not, locate and execute either 'wpt_x86.msi' on a 32-bit system, or 'wpt_x64.msi' on 64-bit Windows (normally in a folder like 'Program Files/Microsoft SDKs/Windows/v7.1/Redist/Windows Performance Toolkit'). That will install the performance kit for you, and you'll be ready to get started in a minute or two.
You start by using one of the WPK suite's command line tools to initiate a 'trace' – a recording of your PC's activities. The toolkit then tracks CPU use, RAM consumption, hard drive reads and writes, and whatever else you've specified, writing the details to a file. When the trace has finished, you can view all these statistics in detailed graphs, zooming in and out, overlaying graphs on top of each other and analysing them in various ways.
To see this in action, click 'Start', type cmd, right-click 'cmd.exe' and select 'Run as administrator'. Click inside the window, type xperf -on DiagEasy and press [Enter].
The Toolkit starts monitoring your PC immediately, so do something that needs a lot of resources, such as load a game, then close it again. When you've finished, switch back to the command window, type xperf -d trace.etl and press [Enter]. Once the file has been written to disk, you're ready to analyse the results.
Type xperf trace.etl and press [Enter], or double-click the 'trace. etl' file in Explorer to see what it contains. (It'll be saved in the current command line folder – probably 'Windows\System32'). You'll find a window containing many graphs, each detailing some aspect of what was happening during the monitoring process.
The 'Process lifetimes' graph, for instance, shows you which processes were running and active. The 'Disk I/O' and 'Disk utilisation' graphs describe aspects of your hard drive usage, and there's a host of charts showing how your CPU was used during the monitoring period.
Click 'Graphs', select 'Disk utilisation by process' and a new graph will appear. Choose the 'Processes' box within the graph, clear 'All processes' and the graph will clear. Now check one or more individual processes and you'll see their hard drive use plotted on the graph. This is very useful if you want to pick out one resource hog from amid everything else.
Selecting 'Graphs | CPU usage by process' does much the same thing for processor use. In just a few clicks you can identify which processes were making regular demands on your CPU during the monitoring period. If these include background apps you don't need, close them down to improve your PC's performance.
It's even possible to overlay one chart over another. The 'Process lifetimes' chart, for instance, only shows you running programs, but if you right-click within the chart and select 'Overlay graph | Disk utilisation | All', for example, the 'Process lifetimes' data will appear on top of the 'Disk utilisation' spikes so you can see how hard drive use changes as programs are launched.
If this is too vague for your liking, right-click within any chart and choose one of its 'Summary table' options. You'll then be shown a table containing the raw data within the graph.
Startup and shutdown
If your PC seems slow, monitoring it with the Windows Performance Toolkit may show what's grabbing your resources. The toolkit isn't just for occasional use, though. It also has day-to-day applications, such as monitoring your PC's startup and shutdown process, and again pointing the finger at what might be slowing it down.
To try this, you need to launch a separate utility, but remember that this will have to reboot your PC to launch its tests. Having too many apps open will distort the analysis it produces, so close everything with a button on the taskbar, but not background tasks with icons in the system tray.
Open an elevated command line, type xbootmgr.exe -trace boot and press [Enter]. Your PC will shut down and reboot twice. You may see status messages from xbootmgr, such as 'waiting for prefetcher'.
Eventually, xbootmgr will display a 'Delay' message with a countdown timer. This is because the program doesn't know exactly when you want the boot analysis to finish. Wait for any bulky background programs to launch, then click 'Finish' when you're happy and allow xbootmgr to reboot again if it asks.
When the process is over, look in 'Windows\System32' for new '.etl' files (or search your PC for boot*.ETL and shutdown*.etl files if you have trouble finding them; ours were called 'boot_ BASE+CSWITCH_1.etl' and 'shutdown_BASE+CSWITCH_1. etl').
Double-click whatever you find to take a closer look at the startup and shutdown process.
Why is my PC slow?: Services and Registry
What you take from the boot and shutdown traces will depend on your individual system, but there are some techniques that will be useful generally. If you think Windows services might be extending your boot times, take a look at the 'Services' chart in the 'boot_BASE+CSWITCH_1.etl' file.
The services with the longest bars are most likely to be slowing your PC down; if there are any that you can disable safely, do so.
Look at your boot 'Process lifetimes' graph – does it contain programs you don't need? If so, uninstall them or prevent them loading by default to reduce the load when your PC starts.
Open the Graphs menu and check the 'CPU usage by process' and 'Disk utilisation by process' options. Explore these charts to see which processes make the greatest demands on your system. This told us that 'WMPNETWK. EXE' was responsible for up to 40 per cent of disk use for several seconds of the boot time on our test PC. A Microsoft add-on called 'SeaPort.exe' was also generating lots of hard drive traffic. With a little exploration, you'll soon be looking at improved shutdown and startup times.
Life isn't always so simple though, and you may have intermittent problems. For example, one day boot and shutdown times are fine, the next they seem to take forever. But the Windows Performance Toolkit can still come in useful. Take a trace once a week and save your trace files. Then, if you capture a slow boot or startup in the future, you can compare it to the trace for an ordinary boot and find out what's changed.
We've looked at how the toolkit can help you monitor simple PC information, but you can look at much more with different XPerf commands.
Are you worried that you may have some driver issues? Fire up XPerf with xperf -on drivers to record driver activity. If you're curious about Registry accesses, try xperf -on registry. There are also commands to tell you about power management (xperf -on power), file-related hard drive activity (xperf on filename), process and thread creation and deletion (xperf -on proc_thread), and a lot more.
Enter xperf -providers kf at the command line to see the other options on your PC. Keep in mind that you can combine multiple flags in the same tracing session, so xperf -on power+registry+drivers monitors power, Registry and driver-related events.
All that really matters is that you experiment. Among all the technicalities, there will also be valuable clues about your PC's performance problems that you can't get anywhere else, and that's worth more than the hour or so you'll spend learning the Windows Performance Toolkit basics.
First published in PC Plus Issue 302
Liked this? Then check outHow to find and fix PC problems with ease
Sign up for TechRadar's free Weird Week in Tech newsletter
Get the oddest tech stories of the week, plus the most popular news and reviews delivered straight to your inbox. Sign up at http://www.techradar.com/register