How To: Defrag Your Computer

Defrag: What is it?

Remember the old days, when we would write or type on paper? We would start at the top of the sheet, and keep writing until we were done. We could then take that five-page book report and neatly file it away.

Imagine if we had needed to store the first paragraph in one part of our file cabinet, the second paragraph somewhere else, and so on. That would really slow us down when we were trying to get the file out of the cabinet. Yet that's kind of how a computer works.

When you save a file, your computer may automatically put parts of the file in different areas of your hard drive, depending on where it has room. This tends to slow down retrieval of the file when you open it.

"Defrag" is short for defragment, the process of putting the various parts of files you have saved in a contiguous place on your hard disk.

To understand how a file can get fragmented on a computer, you need to know a little about how files are stored. A hard disk is divided into sectors. When you install a program or save files, your computer looks for free sectors onto which to copy the information. These sectors may or may not be next to each other. Hence, the files become fragmented.

Additionally, when you delete files from your computer you free up sectors, which are located in various places on the drive. These free sectors are later used when you save different files, or install other programs to your system, furthering the fragmentation.

Why is it better to defrag a hard drive than to just let the files stay fragmented?

Your hard disk is one of the few parts of the computer that contains moving parts, namely the arm that reads information from the drive and writes information to it. When files are fragmented this arm needs to move more frequently. This can cause two issues. First, it increases the amount of time to read or write from the disk, because the arm needs time to move to the next sector. So, programs and files load more slowly. Second, all moving parts wear out more quickly than non-moving parts, and so minimizing the amount of movement helps to maintain your hard disk in good order.

"Defragging" your hard drive moves the various parts of your files so that they are in sequential sectors.

How do I go about defragging my hard drive?

You will need to use a software package to defragment your hard drive. (See below for the names of some such programs.) When you start up a disk defragging program, the first step it performs is to analyze your hard drive to see the extent of fragmentation. This is frequently reported back to you as a percentage, sometimes along with a recommendation. For example, when I last checked my drive I was told that it was 7 percent fragmented and advised that defragging was not necessary at that time. Of course, I could override the suggestion, click the "defragment" button, and do it any way. It's up to the user.

When the defragging process is begun, all you need to do is sit back and wait (or send out for a pizza or make a pot of coffee, because it can frequently take quite a long time for the process to complete). The program will go through your entire hard disk, look for fragmented files, and move them into contiguous sectors. Many defragging programs have graphic displays, showing you a color-coded diagram of the defragging status.

What programs exist for defragging my hard drive?

On the PC platform, a program called "Disk Defragmenter" is included with the Windows operating system. In Windows XP you can find this program by pointing to the Start button, choosing Programs, then Accessories, then System Tools.

There are also commercially available defragging programs. Why would you want to pay for a program when one comes free with Windows? Possibly because of some of the enhancements to the for-fee program. For example, functionality such as scheduled defragmentation and simultaneous defragging of all of your hard drives is included in some commercially available disk defraggers.

On Macintosh computers, Norton SystemWorks 3.0 for Macintosh (Mac OS 9 and OS X) includes a program named Speed Disk, which defragments your drive. Some additional Mac options are PlusOptimizer and DiskExpress Pro for older machines.

Jeffrey Branzburg is a contributing editor and regular columnist for Technology & Learning.

Read other articles from the January Issue

Tags