Page 1 of 1

How hard drive retrive data

Posted: Thu Nov 19, 2009 7:34 pm
by Cyclops
What is the churning sound I hear from my hard drive whenever it is retrieving data?

Let's say you do something simple like double-click on the icon for a spreadsheet file. This simple act, on many computers, can take 20 or 30 seconds to complete, and all during that time the hard disk is churning away. The hard-disk access light flickers and the drive might make a whirring, whizzing or high-pitched whining noise. If the mechanism in the drive is loud, you definitely know that something is going on!

In the article How Hard Disks Work, you can see that there is an arm that holds the read-write heads. This arm can move the heads to tracks near the hub or near the edge of the disk. A normal hard disk is 5 inches (12.5 cm) or so in diameter. This arm, therefore, can move about 2 inches (5 cm) across the face of the disk.

The speed at which this arm can move is astonishing. The arm is very light, and its actuator is powerful and precise. The arm can slide across the face of the disk hundreds of times per second if it needs to.

If you think about how a speaker works, there is not much of a difference. A speaker is moving a lightweight cone back and forth hundreds of times per second to generate sound. As the hard-disk arm moves back and forth rapidly, it sets up vibrations that our ears hear as sounds.

Why, when you click on a simple spreadsheet file, would the disk's heads have to move so much (20 or 30 seconds worth of movement sometimes)? There are three things that cause all the movement:
To start a spreadsheet application like Excel, the hard disk has to load the application itself along with a number of DLLs (dynamic link libraries) that support the application. The total size of all these different files might be 10 to 20 megabytes, and the files are scattered all over the disk. Loading 20 megabytes of data takes a lot of time and requires the disk head to move thousands of times to retrieve all the pieces.

The data file itself has to load. The operating system (OS) has to move the head to the drive's directory to find the folder, make sure the file name exists, and then discover the location of the file. Then the OS may need to read dozens of tracks scattered all over the drive to access the file.

If the physical RAM is full, then during the loading process the OS will have to unload parts of physical RAM and save them to the paging file on the disk. So while the OS is trying to load the spreadsheet application and all the DLLs and the data file, it is at the same time trying to write millions of bytes of data to the paging file to make room for the new application. The drive head is moving all over the disk to accomplish these intermingled tasks.

Altogether, clicking on a single icon may cause 40 or 50 megabytes of data to move between the drive and RAM, with the disk heads repositioning themselves thousands of times in the process. That is why you hear the drive "churning" -- it's doing a lot of work!

What does it mean when a hard disk has a head crash?

you can see that the read/write heads do not touch the platters in the drive. When the platters spin up, they rotate at anywhere between 3,600 rpm and 7,200 rpm.

To the head, the platter seems to be moving at about 150 mph, and a very thin cushion of air forms between the head and the platter so that the head "flies" over the platter. If even the smallest bit of dust makes its way onto the platter, the flight is disrupted and the head "crashes" into the platter, scratching it. The crash, of course, sprays a lot more dust and debris onto the platter and then it's all over.

The other thing that can cause a squealing sound is the bearings in the drive motor. That is another common way for a drive to fail.

Hard disks are amazingly reliable these days, with "Mean Time Between Failures" (MTBF) of 500,000 to 1,000,000 hours. That means that, on average, a drive fails after the specified number of hours, with half of the drives lasting more than that and half lasting less. 500,000 hours is about 57 years. Clearly, not all drives last 57 years, so frequent backups are important.