Pages

Defragmenting your Hard Drives


Defragmentation is something that is required from time to time on your harddisk drive (HDD). 


When a drive is empty it is easy to find space to store files anywhere on thedisk. As files are erased they leave empty spaces between the files next tothem. As you write and erase files over time, many of these empty spaces arecreated. If a file being written is bigger than the largest free space, then itmust broken up into smaller pieces and stored in a number of these emptyspaces.

Fragmentation

This process of files being broken up and stored in a number of smaller piecesis called fragmentation. A section of the disk contains what is called the FileAllocation Table (FAT). It is a file system that keeps track of where all thefiles are stored on the hard drive. 

Eventually a condition exists where there are many fragmented files and emptyspaces scattered all over the disk. When this happens the HDD is said to bevery fragmented. The FAT has to work very hard to manage these chopped upfiles. 

Instead of writing and reading files that are contiguous (in one piece), theread/write head in the HDD must move up and down and jump all over the diskfrom fragment to fragment to access the file. This takes a lot of time! 

It's like Restaurant Seating 

The FAT does the same thing as the person who seats you at a restaurant. 

When the restaurant is empty it's easy. There are plenty of tables that willfit your group. They find you a table big enough, or maybe even slightly biggerthan you need and you all sit down. 

As the restaurant fills up it gets more difficult to find the right sized tablequickly. A couple of things can happen when you show up to be seated. 

  • The greeter checks for space and finds a table that has just freed up and will fit all the people in your party. They seat you as soon as the table is emptied and made ready for your group. 
  • Or they may say, 'We don't have a table big enough to seat all of you, the wait is 25 minutes. Hang out in the in the lounge and we'll call you when we have space.'


Let's seat your Group in Fragments 

Files don't care whether they are fragmented, or located together in acontiguous space of the disk. We know people do care, but let's imagine thepeople in this restaurant don't care either. 


So instead of making you wait for a big enough table the greeter says 'we don'thave space enough for your party of five at one table, but two of you can fitat this table, one at that table and two more can fit at the table in theback.' So you go and get split up at different tables. Your party has beenfragmented.

The greeter continues seating new people this way until waiters are gettingconfused with which food goes with which party, who gets the bill and so on.The whole process bogs down and eventually grinds to a halt. 

The same thing happens on your HDD. The PC spends more and more time workingwith the FAT to find all the pieces of the file you're attempting to access.

Defragmentation

Finally the restaurant manager says, 'Wait a minute,' just as you might saywhen it seems to take longer and longer to read and write files on your PC.

He says 'We are going to defragment this place.' He has everyone get up, moveto one side together with their original group. He then figures out how many 1,2, 3 etc. person groups he has and how they will best fit into his tables. Hereseats each group at an optimum sized table. He now even has some spare tablesopen for new guests. Everything flows along smoothly again.

Running a defragmentation program on your PC reorganizes the files on the HDDso that each file is located in one contiguous space. All the free space isgrouped together on the disk as well. 

How do I Defragment my Drive? 

  • Go to the desktop and double-click 'My Computer'. 
  • Right click the drive you want to defragment, (C:) in most cases. 
  • In the drop down menu that appears, click 'Properties'. 
  • Click the 'Tools' Tab in the dialog box that appears. 
  • In the Tools section, select 'Defragment Now' and defragmentation begins.


NOTE: Don't defragment a drive you want to use anytime soon. It can easily takea couple of hours on a large, fragmented drive. The end of the day is a greattime to kick this maintenance routine off.