How to defragment your computer’s hard drive

Looking for an easy–to–use premium defragmenter tool?                     Get a copy of O&O Defrag Pro.

Question: Several months ago I defragmented my C drive with no problems whatsoever. Recently, I started to defragment the drive again and three hours later nothing seems to be happening. Any suggestions? –D.S.

Answer: There is an easy solution to your problem, but first a little explanation for those that may not know what defragmenting is.

Windows 95 and later operating systems come with a built-in tool call Disk Defragmenter. You can find it under Start > Programs > Accessories and then System Tools. This tool is used to re-organize data on your hard drive so that the drive runs more efficiently.

During daily operations of a PC, the system will look for empty space on the hard drive to write data to. When it finds free space, it starts to write data to that blank spot. If the space is too small to write all the data in one go, it will write some of the data in one area and – when it runs out of space – it writes the extra data to another area. This way, no disk space is wasted.

You might think that it would start at one part of the disk and write the data in an orderly fashion until the disk is full. The problem is data is always being written and deleted from a disk, even with routine use. You don’t have to have installed or uninstalled anything – your computer writes and deletes data as part of its regular job. So you end up with data holes on your nicely organized hard drive.

The best way to understand this is to think of a storage closet. It makes sense for us to start putting stuff in a closet at the bottom and fill it up to the top, but in our daily lives sometimes we take stuff out of the closet. So holes start to appear in our originally orderly storage system.

Let’s say, one day we take a box containing a Halloween costume from the second row of a nicely stacked set of boxes in a closet. The next day maybe we need to put old shoes away. It makes sense to stash the shoes in the hole where the Halloween costumes came from. Perhaps the shoe boxes will fit in that hole. So we fill it up as best we can and toss the excess shoe boxes in a different part of the closet.

This is what a computer does with its hard drive. A computer is smart enough to keep track of where all data is kept even if some pieces of a file (those left-over shoes that wouldn’t fit where the Halloween costume had been) are located in different places on the hard drive.

Data won’t get lost, but over time it does take longer and longer for a computer to find that data, since it has to move the heads that read the data across the hard drive to different places.

This is when it makes sense to defragment the hard drive with the Windows Data Defragmenter, or with a commercial defragmenter.

I run my defragmenter once a month and it keeps the hard drive running efficiently. Depending on the size of the hard drive, it can take hours, but it’s worth doing.

If you find you run the defragmenter and it hangs like D.S.’s system, be sure your anti-virus program and other programs are turned off during the defragmentation process. Even some screensavers could cause a defragmenter to hang or freeze or continually start over without ever finishing, so disable those too, until after defragmenting is finished..

Most bothersome programs that interrupt the defragmenter can be found in the System Tray. That’s that group of icons at the bottom right of your screen, by the clock. Right-click on them and select “Close” or “Exit”. Your anti-virus program’s system monitor will be there.

Some programs, like anti-virus programs, regularly access the hard drive in the background. They’re supposed to do that, but it does interrupt the defragmentation process. If this happens too often, the system will give up.

It’s kind of like when someone is doing math in their head and you start yelling out random numbers at them. Eventually they’ll get distracted and have to start over. If you do that enough times, they’ll give up and punch you in the nose. Good thing computers don’t do that.

Also take a look at our Get rid of fragments on your hard drive FAQ’s.