When a traditional hard disk with spinning platters and moving heads needs to read a (very large) file, it can do so much faster if the file is stored in an unbroken sequence of blocks on the drive. If different pieces of the file are spread around the drive, the hard disk’s heads need to physically move between those pieces. The time it takes is indicated as the seek time in drive specifications.
Defragmentation software rearranges all the files on the drive so they are all stored in unbroken sequences. In Windows you can find it under Start, All Programs, Accessories, System Tools, Disk Defragmenter. Defragmenting mechanical hard disks is a good idea. It’ll noticably speed up your PC if your system drive is a heavily fragmented hard disk. Hard disks are the slowest component in modern PCs. They can use all the help they can get. (That’s also the reason why it makes a lot of sense to replace your system drive with an SSD.) Because defragmentation is so helpful, Windows actually does it automatically when your PC is idle. You may have noticed the HDD drive light on your PC flickering furiously when coming back from lunch, only to stop instantly as you touch the mouse.
Defragmenting an SSD is a terrible idea, for several reasons:
The key benefit to SSDs is that they have virtually no seek time. Reading adjacent blocks of data is no faster than reading blocks that are spread out over the drive. Fragmentation does not affect SSD drive speed.
As I discussed in my SSD Remaining Drive Life article, SSD drives physically wear out as you write to them. Defragmentation software moves around all the files on your drive. Thus, defragmenting an SSD reduces its life span without giving you any benefits.
SSD drives deal with the limited lifespan of their memory cells by using wear-leveling algorithms. These algorithms take advantage of the fact that fragmentation does not affect the drive’s speed. They purposely fragment the drive so that its cells wear out evenly, even if you’re constantly overwriting a small set of files (e.g. database fiels) and never overwriting other files (e.g. operating system files).
Modern SSDs even lie to the operating system. If the operating system tells the drive to save a file in blocks 728, 729, and 730, the drive may decide to write it to blocks 17, 7829, and 78918 instead, if it determines that those blocks haven’t been worn out as much yet. The drive keeps a lookup table of all its blocks, so that when the OS wants to read blocks 728 through 730, the drive reads blocks 17, 7829, and 78918. With such drives, defragmentation software can’t possibly work. The software will think and tell the user that file X was nicely defragmented and stored in blocks 728, 729, and 730, while it actually has no idea where the data is stored physically on the drive.
Conclusion: don’t waste your time and your SSD’s life expectancy by defragmenting it. The automatic defragmentation in Windows 7 skips SSDs automatically. In Vista, you can disable it via the Performance Information and Tools item in the Control Panel. I do strongly recommend you upgrade to Windows 7 if you have an SSD, so you get TRIM support.