Wednesday, November 23, 2005

UDMA just made my day a little brighter!

The average consumer doesn't know this, but the biggest factor in your computer's performance is the speed of the hard drive. My laptop is an Averatec 3150H, a very likeable machine except for its abysmal hard drive performance. I was amused and annoyed recently to see a review of my laptop that said its "slow processor" was a disadvantage of the machine, but said notihing about the hard drive.

Folks, this laptop has an AMD Mobile Athlon 1600+ running at over 1 GHz, but I also have a 800Mhz desktop computer. When it comes to video encoding (a processor-intensive process), my laptop does indeed run almost twice as fast as the desktop computer. But for just about any other task, the 800MHz machine is always much faster.

For example, consider the time it takes for a program to start for the first time (the delay between when you click on a program icon, and when the program appears.) The time required depends almost entirely on your hard drive. Whether your processor is 300 Mhz or 3 GHz makes almost no difference in that delay.

As I began to use my laptop one day more than a year ago, I had the distinct feeling it had become slower. It was slow to begin with, but it had become slower still. Using my geek intuition, I could tell that something was wrong with the hard drive, but I'm a coder geek, not a hardware geek, so I couldn't figure out what was the matter.

After putting up with it for hundreds of hours, I discovered that the hard drive was in "PIO mode", a slow access mode left over from the 80's, instead of using "DMA", the fast and modern way of doing things. but I couldn't fix it because Windows provided no means to do so. People on some online forums said that it could be caused by a loose connection between the hard drive and the motherboard, a poor-quality cable, or a bad BIOS setting. Unfortunately, I couldn't figure out any way to physically reach the hard drive, and there none of the settings in the BIOS screen were related to the problem.

Eventually I decided to search for info again, and this time I hit paydirt. Apparently there's a design flaw in Windows, which causes it to revert to PIO mode permanently after 6 disk errors of a certain type occur. If there is one error per month, for example, Windows will switch to PIO mode after six months. This article explains how to fix the problem. (in one sentence: delete the attribute MasterIdDataChecksum and/or SlaveIdDataChecksum in the key 0001 and/or 0002 in the registry under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E96A-E325-11CE-BFC1-08002BE10318}, and then restart your computer.)

Now I only have to wait 50 seconds for OpenOffice to start, instead of 75. Splendid!

Update: also, see here.

No comments: