Before You Defragment Your PC

Many people think that a hard drive defrag will make their PC run faster. Not so. It could kill your PC altogether, although this is unusual. Still, it's best to take precautions and understand why you are defragging your PC. Why defrag? The goal is efficiency. If you are defragmenting your computer for any other reason, then you've missed the point. We defrag a drive to make it more efficient.

But inefficient hard drives are not the only cause of a PC slowing down. Registry issues, bloatware, malware and just plain too much data can reduce a perfectly good PC to a dead crawl. So before you defrag your drive (which can take several hours) make sure that you have fixed other problems as well.

What's the Risk?

Windows versions starting with WinNT include a "file move" API that most defrag programs use. The idea behind this APi is that a file should be movable even if the file is in use, and the file system will not lose data should something go wrong. Generally this has been achieved, but if a file is being written to the hard drive and a power failure occurs, data could be lost even though a lot of technology has been deployed to prevent this. Similarly, if something catastrophic happens to the OS and it gets corrupted, data would most likely be lost. However, most users are unlikely to encounter these "severe" scenarios.

More likely is a bug in the defrag code, or a clash with a special driver or third party tool, such as a file encryption or compression program, that works very closely with the file system. If it has been badly designed, it could create problems with the defrag program. Follow the backup advice below.

Programs that try to defrag your Windows drive without using the Windows API are the most risky. These generally rely on a boot CD that runs its own OS. Programs that perform the defrag while you are working in Windows do not fall into this category.

If you try to run two different defrag programs at the same time you are likely to encounter problems, usually in the form of the "blue screen of death", and any data that has not been saved to the hard drive will be lost. This is more of an inconvenience than a risk.

Make a Backup

You are about to rearrange hundreds of files on your PC, so before you start, make sure you have a copy of all your data and all your programs. Ideally this should be an image of the complete hard drive so if anything goes wrong you can put it all back to the way it was when it worked. When you make backups, you should always have three copies: (1) the original, (2) one local backup and (3) one remote backup. A local copy is there for convenience and safety, and for when you upgrade your computer. Typically this would be stored on a CD or DVD, or an external hard drive that can be stored in a safe place. The remote copy is for disasters like your building burning down or being flooded, or all your computer equipment being stolen. Windows has its own backup software, but I prefer SyncToy. Then there is Carbonite ($54.95/year), which backs up your data files "to the cloud". And there is Acronis True Image ($49.99), which allows you to create a boot CD that can make a backup of the entire hard drive to a network server or external USB Drive.

Remove Clutter

A lot of files temporary files can build up on a drive: Cookies, temp files, browser cache files, etc. While many of these files are small, their sheer numbers can make the PC feel sluggish. Use a good PC cleaning program like CCleaner to remove this kind of junk. It's free and it is easy to use and highly effective. It can also scan the Windows registry looking for incorrect or outdated entries, and remove them. This optimises the organisation of the registry, and a good defrag program can then defragment the registry "hive" files.

As a general rule of thumb it is best to make sure your Windows drive (usually C:) has at least 10% free space, although more is always better. If your drive is more than 75% full it is best to find files you can move to another file or archive altogether. Also, it is good idea from time to time to look through your list of installed software and remove everything that you can't remember using. The less complex your software setup, the faster it will run. Simple is better.

Check the Hard Drive Health

The best way to test your hard drive is to use the $89 utility Spinrite. Not only will this utility recover and relocate data from unreliable sectors, but it will warn you if the drive is developing problems. It's worth the money, but don't use it on SSD or flash drives.

If you don't have Spinrite, there are other options. Get HDTune (there is a free version) and run the "Error Scan" option. This will test the drive, but doesn't do the data recovery. You can then try running "chkdsk /R" to move any data from the bad sectors. This is a dangerous option, because chkdsk doesn't always get it right. If you are running a laptop you must use HDTune to monitor the temperature of your hard drive. It works on most hardware, except my wife's HP laptop.

Don't Defrag if ...

Defragmentation is for hard drives only. You should not defrag any of the following:

  • USB Flash Memory sticks;
  • RAM drives or RAM itself (there are utilities that do this, and they have no benefit whatsoever);
  • Memory cards for your phone;
  • Any hard drive that is giving errors or making funny noises. Check it with Spinrite first;
  • Any drive that you know to be corrupted, or is running too hot;
  • Any network drive (i.e. on another computer. Most programs won't let you do this anyway);
  • Solid State Drives (SSD): see "Never Defragment an SSD".

Also, be careful when defragmenting hard drives connected via USB. If you are only using them for backups or archives, there isn't much point. Defrag the directories only. It's usually enough.

Your First Time

Remember that whenever you use software for the first time you are venturing into uncharted territory. That's why you need a backup of your data. Also, the first time a defrag program runs it may need to spend more time than normal to reorganise things to an "optimum" level. Give the defrag program all the resources you can spare, by quitting out of all other programs, and as much time as possible. Take precautions against the PC being switched off or rebooted by accident.

You also need to establish a routine for doing a regular defrag. Home PCs generally need a monthly defrag, whereas busy office machines would probably benefit from a weekly "quick" defrag and a more thorough quarterly defrag. You don't want to wear out the hard drive, nor do you want to neglect it.

Note for SSD drives: It may be OK to defrag an SSD drive ONCE after doing a full install, just to tidy up and simplify the directory structure. MyDefrag has a "flash memory disks" defrag option for this purpose. Do not use it too often: once a year is enough. Also, do not allow Windows to create a swapfile on the SSD drive. This is guaranteed to shorten the life of your SSD drive.

See Also

See the article on "Why Defragmentation is Needed" for a more detailed look at defrag strategies and tips.

See "The Memory Optimization Hoax" by Mark Russinovich, which explains why RAM optimisers make false promises in Windows XP and beyond.

Review of Carbonite for more information about this "cloud backup" service.

See the article "Never Defragment an SSD" for a more detailed look at the effects of defragmenting on the life of an SSD drive.

blog comments powered by Disqus
free counters