One of the reasons why your computer may become slow over time is because the files on the hard drive can become fragmented. Now what’s that?
Disk Fragmentation for Non-Techies
As you start filling your hard-drive with new programs, documents, and other files, the operating system tries to find vacant places on the hard-drive to place these files. Like an artist who breaks a tile into multiple pieces to form a mosaic, your computer will break these file into chunks (or fragments) and store them in different places across your hard drive.
When you load a program or open a file, the computer will have to first assemble these "fragmented" pieces thus decreasing the performance. And fragmentation is not just an issue with your computer’s hard disk but even removable devices like the USB Flash Drive or your external drives can also become fragmented with time.
Alternate Windows Disk Defragmenter from Microsoft
A Disk Defragmenter program helps because it will pre-arrange all the "fragmented" pieces of a file close together thus reducing the time it takes to open files or load programs on your computer.
Now almost every version of Windows includes a disk defragmenter utility but the problem with these built-in tools is that that will defragment the entire hard-drive at once and they’ll ignore files that are smaller than 64 MB. Luckily, Microsoft offers another free but lesser-known utility called Contig (short for contiguous) that lets you have more control over the defragmentation process.
What’s unique about Contig is that it lets you defragment individual files, folders, or the entire hard drive. You can run Contig from the command prompt but if that sounds a bit technical, you can also look at Power Defragmenter – an easy and more visual interface for Contig.
Using Power Defragmenter, you can visually select files, folders, or the drive you wish to defragment, and Power Defragmenter will internally use Contig to perform the defragmentation process. You may use Contig on machines running Windows XP, Vista and Windows 7.
For instance, if I were to defragment all the documents on my disk and none of the other files, the command* will be:
Contig.exe -v -s c:\Users\labnol\Documents\*.*
[*] You’ll need to run the utility as an administrator as it will throw an "Access denied" error.
And here’s a detailed output of a standard Contig command that tells you exactly what happens behind the scenes per file.
Unlike other third-party defragmentation tools, Contig uses Windows’ internal defragmentation APIs so it won’t cause disk corruption, even if you terminate the program while its running.
Please note, however, that defragmentation is only recommended for traditional hard drives; computers using newer flash memory based solid-state drives should not use traditional defragmenters. Even though file fragmentation may occur on these drives, it should not impact performance due to the nature of flash memory. Additionally, defragmentation may actually decrease the life of a solid-state drive; however, they cannot cause this on a traditional platter-based hard drive.