How Disk Defragmentation Works
This operation not only helps put file pieces back together, but can also consolidate free space so that there are larger blocks of space available to write new files thus preventing further fragmentation. A good defragmenter will also include an algorithm for smart file placement that utilizes the knowledge of faster and slower data access zones on the hard drive. Let’s take a closer look at these aspects of disk defragmentation.
In simple terms, file defragmentation is the process of putting file pieces back together. What disk defragmenters do is re-write files into contiguous blocks of free space making sure that all file fragments are written in a consecutive order. This way the hard drive's read-write head has to go to one location to access the requested file instead of having to gather file pieces all over the drive.
Free Space Defragmentation
Defragmentation, or consolidation, of the free space on a hard drive is one of the most effective fragmentation prevention techniques. When free space is in large contiguous blocks instead of scattered around the hard drive in smaller sections, new files that get written to the hard drive can be easily placed in one piece. When rewriting files during disk defragmentation, defraggers try to place all files closer together so that the remaining free space is consolidated into larger sections.