What is hard drive fragmentation and should you care?

All of your computer’s programs and data are stored on a device called a hard drive (or an SSD, when I say hard drive in this article, I could be talking about either type). Every time you open a document, load a webpage, or even turn on your computer, you are reading and writing data to your hard drive.

There are two basic types of hard drives in use: rotational and solid state. Rotational drives have a platter and head much like an old record player but they use magnetism to store data instead of a record player’s grooves. Solid state drives (usually just called SSDs) have no moving parts and store data electronically in special memory.

SSDs do not suffer from fragmentation because it takes the same amount of time (virtually instantaneous) for it to read data that is sequentially stored as it does if the file is fragmented. Moreover, since there is no linear facility for storing data in an SSD, there really is no such thing as fragmentation at all. The rest of this article deals only with rotational drives.

With a rotational drive you write data when you install your operating system for the first time (or the company you bought the computer from does it for you), install new software, create a new document, and even when you browse the internet or check your email. Data is even written to your drive without you even knowing about it when your operating system and antivirus program installs updates.

The way data is stored on a hard drive is pretty much sequentially. When it is time to write a piece of data to the drive it is written at the first available empty spot. The problem is that the spot may not be big enough to hold the entire piece of data and this will force the data to be broken up into smaller pieces and written in multiple locations.

Let’s look at this a little closer:

Say you have three boxes and each box can hold four little cubes. The boxes represent places on the hard drive that holds data (called sectors) and the cubes represent bits of data.

The first piece of data you need to write is two bits long so you drop two cubes into the first box (green). The next piece of data is also two bits so you drop two more cubes into the first box (blue). The third piece of data is once again two bits so you drop two cubes into the second box (red). Now things get interesting.

We need to delete the second piece of data as it was just a temporary file (we have tons of those on our devices and computers all the time) and so we remove cubes three and four (the blue ones) out of the first box. Easy enough.

Now we need to write another piece of data to the drive and it is four bits long. We drop the first two cubes into box one where the blue cubes used to be and the last two cubes into the second box. Now we have a fragmented file (the yellow data) as a piece, or fragment, of the file is in box one, then there is some unrelated data at the beginning of box two (the red ones), and then at the end of box two is the other piece, or fragment, of our four bit file.

This happens over and over again, thousands of times a day. The more fragmented a hard drive becomes, the slower it runs because it is constantly piecing files together before it can deliver them to you, and constantly breaking them apart to write them all over the drive.

On a drive that is not fragmented what happens is that the drive gets a request for a specific piece of data from the operating system. The drive then moves the reading head over to the part of the drive that stores the file allocation table and looks up where the requested data is stored. It then moves the head over to the position referenced in the file allocation table and reads the data and returns that to the operating system.

On a fragmented drive it has to do exactly the same thing as we discussed above except it may have to return to the file allocation table and then move to a new place to read each part of the file. If the file is broken into twenty pieces, then it can take nineteen times longer to read the file and return the results to the operating system than if the file were stored sequentially.

Defragmenting a hard drive means running a specific piece of software that reorganizes the data on the drive in such a way that the majority of the data is no longer fragmented. This means reading pieces of a file from all over the drive and then writing the complete file in one contiguous place on the drive.

This allows the drive to read data much faster which makes the computer seem substantially faster at virtually everything it does.

But you thought the operating system kept the hard drive defragmented automatically? Yes and no. Some operating systems such as those based on Linux and FreeBSD (all versions of Linux, MacOS) do an excellent job and do not fragment as much as others. Newer versions of Windows do a respectable job of keeping the drive under control but can still use a little help on occasion. Older versions of Windows do a horrible job at this.

My recommendation is that for most people, Windows 10, Linux and MacOS need no defragmentation. Windows Vista, 7 and 8 can use help maybe once every couple of months. Windows XP or older could stand defragmentation almost on a daily basis.

If you are a user that tends to read and write a lot of data on your drives then you can defragment more often than my recommendations. If on the other hand you do nothing but  surf the internet, read email, and play solitaire you may never need to defragment your drive at all.dd

For you Windows users who want to defragment your hard drive let’s take a look at some software that will let you do that easily and for free.We could use the built in software which does work, but it is easier to just download free software that works better.


Auslogics Disk Defrag is free, easy to use, and very effective. You can get it from www.auslogics.com although I will have to warn you that it tries to install unwanted software when you install it so watch and read very carefully. Make sure you select the “custom install” from the main install screen and deselect any software other than Disk Defrag. Normally I would not recommend software that tried to hide other installs but this defrag software is very good and the extra unwanted software it installs is not that bad if you accidentally get one installed.