To help us provide you with free impartial advice, we may earn a commission if you buy through links on our site. Learn more

How to defrag in Windows 7, 8 and 10 – and should you defrag an SSD?

Need to change your defrag settings in Windows? We've got you covered

Defragging your hard disk can make a serious difference to performance. We’ve seen in the past that defragmenting your hard disk can reduce boot time and program launch times significantly, so it’s worth doing. Nowadays, disk defragmenting is done in the background, most Windows PCs have it enabled by default so you don’t have to think about it. This, of course, can be a blessing and a curse.

In this guide, we’ll explain why a fragmented hard disk occurs, how to ensure your disk is in tip-top condition. We’ll also show you how to switch off Windows’ sometimes pesky Defrag tool.

Why does your hard disk get defragmented?

The more you use your PC, the slower it gets. While the number of applications you install on your computer can cause some of this performance drop, the way Windows uses your hard disk is equally to blame. A file appears to you as a single object, but to Windows it’s a collection of small fragments, known as clusters, which are stored on the hard disk. For NTFS the standard cluster size is 4KB, so a 12KB file is made up of three clusters. This may seem a stupid way of doing things, but clusters mean that free space on your hard disk is used more efficiently.

Struggling to get to grips with Windows 10? We have a tutorial for that

For example, if you write three 12KB files to a disk, the first nine clusters would be used. If you then delete the middle file, there’s a 12KB gap of free space; if we were just going to write complete files, this gap could be filled only by a file of 12KB or smaller. Splitting the files into clusters means this space can be used by any file. If, for example, we wanted to write a 24KB file, Windows just writes the first 12KB in the gap and the remaining 12KB after the last file.

Efficient it may be, but the more you add and delete files, the more gaps you get on your disk. Writing a new file can spread its fragments all over the disk. This reduces performance, because the disk has to move its heads repeatedly to read a file. Defragmentation software reorganises your disk so a file’s clusters are reunited and the free space is consolidated.

Should you defrag your SSD?

The answer to your question depends on whether you’re using Windows 7 or not. The disk defragmenter in Windows 7 is specifically designed to defragment conventional drives, and will shorten the life of an SSD, the Disk Optimizer utility in Windows 8 and beyond correctly recognises an SSD and won’t try to defragment it. Instead it will send TRIM commands, which trigger the drive to reclaim space taken up by deleted files, and will help keep its performance optimal. In other words, in Windows 8 and above it is safe – in fact it’s a good idea – to leave optimisation scheduled for all volumes on all disks.

How to defrag in Windows 7, 8 and 10

Defragmenting your drive in the three most recent versions of Windows is simple. Windows’ defrag tool hasn’t changed an awful lot, although in Windows 8 and 10 it’s been rebranded to Optimize Drives to reduce confusion about how it treats SSDs (see above). Go to the Start Menu and type ‘defrag’ and click on the Defragment and Optimise disks (Disk Defragmenter in Windows 7 ) program.

You’ll be presented with a list of drives attached to your PC, each one with a name, type, last defrag session and the disk’s current status. Before you defrag you should click the Analyse button to check whether you need bother defragging. If you’re ready to defragment, click ‘Optimize’ (‘Defragment Now’ in Windows 7). You can defragment any local disk, including those attached by USB. You can’t defrag network drives.

How to disable defrag in Windows 7, 8 and 10

There are plenty of reasons why you might want to disable – or reschedule – disk defrag operations. Defragging can be a processor hog on lower-end PCs so you may wish to do it at your leisure every few weeks. To change how Windows  behaves, follow the steps above to open the Optimization program and click on Change settings. To disable these operations entirely, untick the ‘Run on a schedule’ box. If instead you want it to happen less frequently, change the Frequency to Monthly.

If you want an alternative defrag tool, the highly popular, free Defraggler tool is an excellent replacement. It has advanced scheduling options, and the ability to defrag the drive before Windows has fully loaded, meaning you can defrag files that are not usually available to defrag tools running when Windows is fully booted. Defraggler appears to be quite a lot more fussy than Windows’ built-in tools: it decided a drive on one of our test laptops was 8% fragmented, while Windows thought everything was rosy with just 1% of files fragmented. If you’re serious about performance, Defraggler is a great, free choice.

Read more