Contents
F.A.Q.
 
Why did you create HDD Perf?
I have a really nice laptop (1GHz PIII, 256 Mb RAM, 20Gb HDD) that normally fits my needs in my daily work. Well, almost... Everything would be perfect if the disk were not soooo sloooow.  If I do more than one task that requires using the disk, everything slows down very fast and the system is not responsive any longer. If I click anywhere, I do not get the action done until some seconds after. Not to mention when the system starts swapping!

I benchmarked the hard disk of my laptop and it is as slow as the 2,5Gb drive I installed in my good old home-made 486 computer 8 years ago. And I have reasons to think that the great majority of low energy laptop hard drives out there have the same problem. Hey! Do you want performance or mobility?

When I am in such situation, I can't do anything to recover the responsiveness other than stopping the processes that are causing the heavy disk usage (something that most times I do not want to do), but at least I can anticipate that the situation is going to appear.

When I am in a traffic jam, I like knowing the root cause of it so I can act on the basis of it. For instance, if it is a closed street, I can try to find an alternate way. When your computer is not responsive, HDD Perf shows you how your disk is performing, so that you can analyse if the root cause is the disk or the CPU (I always have the Windows Task Manager running in my systray as well) which on the other hand are the most typical causes of system responsiveness loss.

Also, I like programming very much and this project has helped me to learn the Win32 API.
Is HDD Perf similar to the computer case HDD LED?
Well, yes and no. It informs you that your disk is being more or less used, but you'll agree with me that HDD Perf gives you more useful info and it is much more visible and informative than the case LED. Anyway, how often do you turn your head to look the case LED? HDD Perf proactively informs you as soon as you need to be informed.
How does HDD Perf measure the use of the disk?
Not too much merit here. HDD Perf just uses the "\PhysicalDisk(_Total)\%Idle Time" counter that Windows provides through the pdh.dll and perfdisk.dll libraries. Before I created HDD Perf I used to have Performance Monitor running with that counter in it.

It is important to note that although Windows NT has pdh.dll, it does not have that counter. That is the main reason why HDD Perf won't run on Windows NT.
What if I have more than one disk drive?
Note the "(_Total)" in the counter name. According to Microsoft, "you can use the _Total instance to monitor data for all the computer's drives", although I do not know the algorithm they are actually using. Also, according to them "interpret the % Disk Time counter carefully. Because the _Total instance of this counter may not accurately reflect utilization on multiple-disk systems, it is important to use the % Idle Time counter as well."

Keep in mind that HDD Perf is specially targeted to slow disk laptops where multiple-disk configurations are extremely strange.
Which Windows registry entries are used?
If the "Save settings to registry" checkbox is checked in the "Settings" dialog, the HDD Perf settings are stored in the following branch of the Windows registry:

[HKEY_CURRENT_USER\Software\HDD Perf]


If the "Start HDD Perf on windows startup" checkbox is checked, a new value named "HDDPerf" is created in the following key:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]
Troubleshooting
In case you get a message box with the following text in it:

"PDH initialization failed with error code: #"

you should check that the following counters exist in the "Add Counters" dialog box that appears in the Performance Monitor

Control Panel -> Administrative Tools -> Performance

when you right-click on the graph (those are some examples in English and Spanish versions of W2K/WXP, but it should be the similar for any windows language):

PerfMon counter selection dialog


  • W2K/WXP English
    • \PhysicalDisk(_Total)\% Idle Time
    • \Processor(_Total)\% Processor Time

  • W2K Spanish
    • \DiscoFísico(_Total)\% inactivo
    • \Processor(_Total)\% Processor Time

  • WXP Spanish
    • \DiscoFísico(_Total)\% tiempo inactivo
    • \Procesador(_Total)\% de tiempo de procesador

I have seen some cases in which the "PhysicalDisk" counter was not available. In those case, the W2K/WXP command:

   diskperf -y

followed by a reboot may help.

Also, you can check that perfdisk.dll and perfos.dll metrics are enabled. See Microsoft's document 248993.