You may have heard someone say that you should defrag or defragment your computer regularly to keep it running fast.  Or you may have heard that you don't need to defrag anymore because Windows does it for you.  Let me try to clear it up for you and offer some recommendations.

What is defrag

Defragmenting as the name implies reverses or fixes fragmentation on a hard disk drive.  Files become fragmented or spread out on the drive through normal use; its a side effect of the way the computer lays out data.  Simply, the computer will lay out a new file onto the drive in the first available space, even if that space is not large enough.  If it can't fit the entire file into that space, it fragments the file and puts the rest of it elsewhere.  Sometimes a large file can be stuffed into forty or more gaps on the hard drive, spread out all over the place.  The computer knows where the file is due to an index, but due to the way a mechanical drive works with a spinning metal disk and a magnetic head moving back and forth reading data; having a file spread all across the hard drive really increases the time it takes to read that file again when it is needed.  Your computer creates, deletes, modifies and moves hundreds of thousands of files and fragmentation occurs naturally through normal use.

A good defrag program will locate those split up files and put them back together again.  It moves the file to a space large enough to hold the entire thing and fills gaps with smaller files to help prevent further fragmentation.

What about SSD

Sold State Drives or SSDs do not suffer from slowdowns when fragmented, and should not be subjected to a normal defrag as it can reduce the life of the drive.  They can however benefit from the Optimise process that newer defragmenters perform.  It basically clears the free space properly and triggers the drive's built-in garbage collection making it run faster again.  Make sure that the defrag program you choose recognises SSDs and knows what to do with them.

Doesn't Windows defrag automatically

Modern versions of Windows do have a built in defragmenter, but it has a light touch and doesn't do a very good job.  It is normally scheduled to run very early in the morning also, so it may never run.  Sometimes your computer will automatically run maintenance while you are not using it, but trust me, its not doing a good job.  You can check its work by running a proper defrag program.

What do I need and should I pay for a defragmenter

There are quite a few purpose built defrag programs around, some free, some not.  Typically the main difference between a free version and a paid version is whether it runs automatically or not.  If you are happy to run regular maintenance on your own computer, then you can stick with a free one.  One of the easiest free defragmenters is Defraggler from Piriform.

Defraggler - Simple defrag tool

As you can see from that picture, my D: drive has over 46,000 fragments.  You can also see that the health is Good.  You shouldn't defrag a drive that is not healthy as it may fail completely during the fairly intensive process.  Defraggler knows how to optimise SSDs as well.  If I analyse my Sold State Drives it shows that they are all between 30 and 60 percent fragmented but it doesn't matter because they work differently.  I can optimise them to bring them back to peek performance, but that is more to do with how the free space is handled, not how the files are laid out.

How often should I defrag

It depends how you use your computer.  You will learn how quickly your drive becomes fragmented as you run your maintenance.  Start with once per month and see how it goes.  If your drive isn't very fragmented then you can probably get away with doing it less frequently.  Some people might benefit from running a defrag once per week and would probably schedule it to run automatically.