Hunting down hard disk resource hogs

Most users find that the longer they use Windows, the slower it seems to run. You can tweak Windows in countless areas to regain that lost speed, but most techniques result in negligible performance boosts. I'll show you how to focus your troubleshooting efforts on disk time usage to restore Windows to its past performance levels for yourself and your users.

Disk time percentage and disk queue length

IT professionals think of hard disk corruption or inadequate disk space as the cause of most system performance problems, but disk time is an equally important performance factor. Disk time is represented as a percentage of time that the hard disk is in use. If the hard disk is running 80 percent of the time, for example, you can be sure that system performance is suffering.

Another factor to consider is the average disk queue length, which refers to the number of processes that are waiting to use the hard disk. Using the disk time percentage in conjunction with the disk queue length will tell you not only how much the hard disk is being used but also if the heavy usage is a problem. For example, if the disk time is 40 percent but the average disk queue length has a factor of two or less, then the hard disk is keeping up with the demand that's being placed on it. On the other hand, if the percentage of disk time and average disk queue length are both high (above 80 percent disk time and a factor of two or more for the average disk queue length), processes are waiting for the hard disk to become available. Any time a process has to wait for a component to become available, the user will experience less-than-desirable performance.

Measuring hard disk performance

To accurately diagnose a system's hard disk, you need to measure the percentage of disk time and the average disk queue length. Begin by performing a full defragmentation on all of the system's partitions to ensure that all files are contiguous and that the hard disk can perform file reads and writes optimally. Click on the Start menu and select All Programs | Accessories | System Tools | Disk Defragmenter. Once you've defragmented all partitions, run the Performance Monitor utility by opening the Control Panel and clicking Performance And Maintenance | Administrative Tools | Performance (Windows XP) Or Control Panel | Administrative Tools | Performance (Windows 2000).


Tip
When the Performance Monitor opens, select any counters that are running from the bottom of the window and press [Delete]. Every counter that's running has a slight, but noticeable, impact on the system's performance. Therefore, the fewer counters you use, the more accurate your measurements will be.

Click the Plus icon to open the Add Counters dialog box. Next, select PhysicalDisk from the Performance Object drop-down list, which will bring up a list of the physical disk counters. Select the %Disk Time counter from the list and select the All Instances radio button to tell the system to measure the performance of all hard drives. Click the Add button to add the counter to the Performance Monitor. Finally, select Avg. Disk Queue Length from the counter list, select the All Instances radio button, click the Add button, and click Close. The Performance Monitor will begin analysing the disk usage, as shown in Figure A.

Figure A
Hard disk
The numbers beneath the graph refer to the percent of disk time for Drive 0.

You can see that the lines on the graph correspond to the counters that you've installed. For example, in Figure A, the pink line is predominant. You can tell by the legend that the pink line corresponds to the average disk queue length for the C: and D: partitions of Drive 0. You can also see the exact values of any counter by selecting the counter that you want to examine. It's best to look at the actual numbers rather than the graph, as the graph can be deceptive if the scale isn't set correctly.

Narrowing down the suspects

Now it's time to figure out which process is using all of those disk resources. First, press [Ctrl][Alt][Delete] to access the Windows Security dialog box. Next, click Task Manager to bring up the Windows Task Manager utility, which reports on the resource utilisation of every process running on the entire system.

While disk usage isn't one of the factors that Task Manager normally reports, you can configure it to provide this information. First, select the Processes tab to view the list of processes that are running on your machine. Next, select View | Select Columns. You'll see a list of all of the resources that you can monitor through the Task Manager. I recommend deselecting every resource except I/O Read Bytes and I/O Write Bytes. When you click OK, you'll see the number of bytes read and written by each process, as shown in Figure B. The trick now is to go through the list and look for rapidly changing values. It's normal for most of the values to occasionally change, but if you see one that is constantly changing, then the process that corresponds to that value is hogging your system's disk resources.

Figure B
Hard disk
To kill a system resource hog, highlight the process and click End Process.

If the rogue system process is a part of the Windows operating system, there's a good chance that the excessive disk usage is caused by thrashing. (Click here for more information on swapping vs. thrashing.) If the disk usage is traced to a non-Windows process, you may have problems with an individual service.


Be careful
If you eliminate a process you feel is causing excessive disk usage, processor time and memory will also be affected.

Conclusion

I've explained how excessive disk time usage can degrade system performance and I've shown you some ways to track down the processes that create this problem. By using the Performance Monitor to measure both disk time and average queue length, you can get a sense of whether the hard disk is being taxed by the system's processes. Analysing the Task Manager further narrows down the possible suspects that may be causing the problem.

TechRepublic is the online community and information resource for all IT professionals, from support staff to executives. We offer in-depth technical articles written for IT professionals by IT professionals. In addition to articles on everything from Windows to e-mail to fire walls, we offer IT industry analysis, downloads, management tips, discussion forums, and e-newsletters.

©2001 TechRepublic, Inc.

Advertisement

Talkback 2 comments

    Hi, this article appears to re ...Anonymous -- 02/11/02

    Hi, this article appears to relate to Windows 2000. Can I do the same thing with Windows 98?

    Hi.. ur article really helped ...Anonymous -- 02/06/04

    Hi.. ur article really helped me lots.. I atleast know whats hunting me...
    Ok for the problem, i got a 7200rpm seagate hdd, whenever i transfer any 700mb file (or big) to any other partition on my hdd, it takes more than 3 mins.. and as u predicted the Avg. Disk Queue value is more than 2.xx so its almost more than 100 all the time..

    But in Windows 2003 it takes only 30 secs to do the same task.. so i tried ur method and saw what was taking the resources.. it was explorer.exe, so now if i start the copy process and kill the explorer.exe the copy process finishes within 30 secs, but if i let it stay then it takes 3 minutes as usual..

    Please suggest me what should i do.. i'm really very troubled by this problem and i was almost about to get myself a new hdd..

    I really believe that only u can help me now.. :-)

    Bye,
    Jazz

Add your opinion

Sponsored content

Power Centre - Content from our premier sponsors

Blogs

  • Renai LeMay How reliable is IP telephony?
    Have you ever heard a weird kind of hissing, crackling or popping noise when calling someone on an IP telephony line? How rare is the phenomenon these days?
  • Array Forget the NBN, 100Mbps is already here
    Telstra and TransACT will shortly begin offering 100Mbps broadband to many customers. By moving early, the companies have not only raised the bar for Australia's broadband services, but thrown down a challenge to a government that now faces increased pressure to deliver the NBN as promised.
  • Array IT: Govt's cost-cutting bitch
    The government needs to stop looking at IT as a necessary evil or the place to remove costs when the Treasurer comes calling.
  • More blogs »

Tags

Back to top

Featured