Are you still defragmenting?

Microsoft Windows has always included a feature to defragment hard drives, and defragmenting is widely recommended as a necessary maintenance activity. But does it make a difference?

When DOS and early versions of Windows 95/98/ME were released, they used a simple file allocation table system (“FAT”) to store files on hard drives. The file allocation system was designed to use hard drive storage efficiently, allowing a large file to be broken into pieces that could be stored out of order on the drive. This approach was intended to make efficient use of the space on small hard drives with frequently deleted files.

When the parts of a file were stored in many locations on a hard drive, DOS and Windows 95/98/ME would force the hard drive to thrash about collecting the pieces of the file. Both DOS and Windows 95/98/ME could only do one task at a time, so they could not perform any additional tasks to optimize the process of storing and retrieving files.

For example, imagine a 100 page document, with each page stored in a different place on the hard drive. Under DOS and Windows 95/98/ME, the operating system would force the hard drive to collect the pages of the document in order, making the hard drive go back and forth multiple times, reducing performance. Defragmenting the hard drive would combine the pieces of a file to allow the hard drive to read back files in a smooth continuous pattern.

All of this changed with the introduction of NTFS (“new technology file system”) in Windows NT/2000/XP and all subsequent versions of Windows. While files could still be stored in many locations on a hard drive, Windows with NTFS would read back the files from the hard drive out of order, allowing the hard drive to move in a continuous fashion while Windows would re-assemble the files in correct order in memory. This method is known as “elevator seeking” since it follows the way an elevator in a building works, picking up all passengers as the elevator goes up, rather than responding to the order the buttons are pushed.

Since elevator seeking ignores the location of files, it also means that defragmenting has little or no effect on performance. Instead, we recommend decompressing all files on a hard drive to improve performance, since the Windows cleanup wizard will compress files.

With the introduction of SSD (solid state drives) in 2011, defragmenting is not recommended. SSD drives have an unlimited lifetime read capability but a limited write capability, so the additional writing creating by relocating files during a defragmentation reduces the longevity of an SSD drive.

For SSD drives, instead of defragmenting, they need to have partially filled blocks of data re-written to optimize write performance. In Windows 7, this maintenance is done automatically by the operating system. For Windows XP and Vista computers using an SSD drive, software that supports the SSD TRIM command should be run monthly to maintain performance.

This entry was posted in Computers, Hardware, Services, Software and tagged , , , . Bookmark the permalink.

Leave a Reply