People often ask me how important it is to defragment (“defrag”) their systems. The answer is very. Or not very. Depending. First of all, what is defragmentation, and why do we need to do it at all?

The first thing you need to know is that a hard drive is a mechanical device, consisting of  a glass or metal disk honed to a microscopically smooth finish and coated with magnetic material (the same stuff that audio and video tape are made of). The alignment of the crystals in the magnetic material determines whether a given chunk is read as a 0 or as a 1. All digital data consists of strings of 0s and 1s arranged into meaningful patterns. A read/write head pivots back and forth over the drive surface to encode and decode the magnetic signals on the disk. Data is recorded as a series of concentric rings (tracks) centered around the drive spindle.

Second, not all parts of the hard drive deliver data to the system at the same speed. The outer edge of the spinning hard drive moves at a faster actual speed than the inner part, and therefore can deliver data faster. For this reason, the system preferentially writes data to that part of the drive. The system also typically makes every effort to write data into continuous stripes within a given track. However, if a track gets filled up before a block of data can be completely written, then the system must find another track on the drive to write the remaining data. The system has no way of knowing how much space it will need to record a given chunk of data, so it frequently has to break the data into separate pieces to make it all fit. “Fragmentation” occurs when data that logically belongs together becomes physically separated as it is written to the hard drive. Fragmentation slows the process of data retrieval down because it requires a certain amount of time to reposition the read/write head as it scans across the various tracks of the hard drive. “De-fragmentation” is the process of assembling all of those separated pieces of data into continuous blocks, preferably in the faster part of the disk.

Fragmentation really becomes a problem as the drive approaches capacity. The available blocks of free space become few in number and widely scattered, forcing the hard drive to work constantly even under periods of low demand. Long before the typical system displays the “disk full” error message, it has grown painfully slow due to intense fragmentation.

The Windows operating system is a very dynamic environment. Typically, dozens of read/write actions take place every second of operation. Temporary files are written and erased again and again. Windows also maintains a number of permanent files as part of it’s normal operation; these typically grow in size over time. Normally, they are hidden from the user but if you deselect the “Hide protected Windows system files” option under Folder Options, they become visible. Users’ data files also become fragmented as they are added to over time. A heavily used system can become fragmented quickly.

You can limt fragmentation and the slowness that comes with it by keeping your hard drive from filling up. My rule of thumb is this: If the drive is over half-full, it’s time either to start deleting stuff, or to get a larger drive. Hey storage is cheap. A terabyte–a trillion bytes of storage–costs less than $100. Stop to think about just how large a number a terabyte is.