Sunday 17 August 2008

Proactive PC Maintenance - How Disk Defragmenter Works

The phrase "disk defrag" is typically used to refer to the Windows utility called Disk Defragmenter. It is designed to solve a problem that occurs because of the way hard disks store data.

Three important facts about hard disks:

1. Hard disks store data in chunks called sectors. If you think of the surface of the disk divided into rings (like the rings of a tree), & then imagine dividing each ring into pie-slices, a sector is one pie-slice on one ring. Each sector holds a fixed amount of data.

2. The hard disk has a small arm, like that of a record player, that moves from ring to ring on the surface of the disk. To reach a particular sector, the hard disk moves the arm to the correct ring & waits for the sector to spin into position.

3. Hard disks are slow in computer terms. Compared to the speed of the processor & its memory, the time it takes for the arm to move & for a sector to spin into place is an aeon.

Due to 3, you want to minimize arm movement as much as possible & you want data stored in sequential segments on the disk.

So let's imagine that you install a new application onto an empty hard disk; because the disk is empty, the computer can store the files of the application into sequential sectors on sequential rings. This is an efficient way to place data on a hard disk.

As you use a disk, however, this level of efficiency becomes more difficult for a disk. What happens is that the disk fills up. Then you erase files to reclaim space. These files that you delete are scattered all over the surface of the disk. When you load a new application or a large file onto the disk, it ends up being stored in hundreds or thousands of these scattered pockets of space. Now when the computer tries to load the scattered pieces, the disk's arm has to move all over the surface & it takes forever.

The idea behind the disk defragmenter is to move all the files around so that every file is stored on sequential sectors on sequential rings of the disk.

As you might imagine, individually picking up & moving thousands of files on a hard disk is not a particularly fast process; it can take hours.

So, make sure you run Disk Defragmenter when you are not planning to use the computer for anything else!


No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...