First a little background information for non-technical readers. When a file is written to the disk drive, and it could be your CV written using a word processor, or a smashing new photo editor you have installed like Photoshop, it may be written as a single continuous file on the disk, but it could be split into two or more parts and a bit could be saved in one place on the disk and a bit saved someplace else.
The problem is that documents, photos, apps, system files, and other things are constantly being written, read, and deleted, so it is not always possible to find a space big enough for a file to fit in. It may be divided into small piece to best fit the spaces on the disk.
Files grow too. You may save a word processor document today, but tomorrow you might load it up and write some more. As the file gets bigger there isn’t always the space to expand into, so extra space is used elsewhere for the growing file.
For various reasons then, files can end up split into multiple parts that are scattered across the disk and stored in different locations. Windows keeps track of the parts of a file so when you need to access it, it can go and get them all.
The problem with mechanical disk drives, and one that does not affect solid state storage (SSD), is that it takes longer to go and find all the parts of a fragmented file than it does if the file is stored all in one location on the disk drive.
The more fragments a file is broken into, the longer it takes to load. When lots of files become fragmented, the computer slows down because it takes longer to load files, save them, run apps and so on.
Fragmentation is bad. Defragging is good. When a disk drive is defragmented, files that are divided into several parts scattered across the disk and reassembled and saved as a single file. They can then be accessed faster and more easily because the disk drive does not need to hunt for them.
Windows has a defragmenter utility and it is run automatically on a schedule to defragment the disk. This keeps the contents free of file fragments and so the disk performance is maintained. You will not see it working because it does it in the background and it does not display anything on the screen. It just works. Or does it?
Defrag the disk
Windows disk defragmenter can be run in manual mode whenever you want and it is easy to use. I will be using Windows 10, but Windows 8 and 7 are very similar. Open an Explorer window and select This PC in the left panel. Right click the disk drive (C:) and select Properties on the menu that is displayed. Select the Tools tab and then click Optimise.
This opens the disk defragmenter interface. Some disks are divided into partitions, so you may see several listed. The one used to store Windows and your files is C:. Select it and click Optimise.
The disk is automatically defragmented once a week on a schedule by Windows, so it should not take long to run manually because at most there is just seven days’ worth of fragmented files. It might take five or 10 minutes at most.
Check for fragmentation
After running Windows disk defragmenter it is not unreasonable to expect that the disk contents are defragmented. There are other disk defragmenters and these can be used to independently check the state of the disk drive.
For example, you could use Defraggler. There are two versions, one that must be installed and a portable version that you just unzip and run from anywhere. I prefer the portable one and both versions are free.
Run Defraggler, select the C: drive and click the Analyse button. After the disk has been analysed, select the Files tab to see a list of the fragmented files. Click the Fragments heading to sort them by the number of fragments (click it twice if necessary to show the most fragmented at the top).
Defraggler was run just seconds after Windows defragmenter finished defragmenting the disk, yet it shows a long list of files that are fragmented. One has 91 fragments!
Perhaps Defraggler is wrong. Maybe it is a bug. IObit Smart Defrag is another free disk defragmenter and there is a portable version that you can run from anywhere as and when you need it, rather than installing it and running it all the time.
Smart Defrag shows almost the exact same results and there is a long list of fragmented files.
Why is this happening? Some files are in constant use and so they cannot be defragmented. The windows swap file is one of them. The number of locked files that cannot be defragmented is small though, and it does not account for the long list in Defraggler and Smart Defrag.
Expanding the Defraggler window and viewing the path to the fragmented files revealed that most, but not quite all of them, were in the Google Drive folder. The Google Drive app is installed on my computer and it syncs a local folder on the disk with the remote online storage. It makes accessing files on Google Drive easier because they are on the local disk and not remote online storage, and it also means there is a backup as files are stored in two places – online and locally.
It looks like Windows disk defragmenter ignores the Google Drive folder on the disk. It could be because the Google Drive app has flagged the folder as always in use, like a file that is open in an app. However, this does not appear to be true because it is possible to select the files in Defraggler and defragment
It is not clear why Windows ignores the Google Drive folder when other defragmenters can defragment it. It explains a lot of the files that are not defragmented by Windows, but there are a few others that are skipped for some unknown reason.
Windows defragmenter 64GB limit
It is well known that Windows disk defragmenter does not defragment large files. Any fragment that is over 64MB is ignored. Big files can have several fragments and they will not be reassembled and stored as a single block on the disk.
The reason for this is simple and quite sensible. It doesn’t make a lot of difference.
To see why, think about going on a 100 mile journey by bus. It stops three times for five minutes each. The stops add to the journey length, but it is a long journey and the stops are infrequent. Now imagine a one mile bus ride that stops three times for five minutes each. The delays are significant and add a lot of time to the short journey.
It is like that when accessing files on the disk. When a big file is split into fragments, it does not take significantly longer to access them. When a small file is split into fragments then the time needed to find each fragment is significant and make the process a lot slower. It is therefore important to fragment small files and large ones can be ignored – they just aren’t worth the effort of defragmenting.
Large files and the Google Drive folder makes up nearly all of the file files not defragmented by Windows. There are a few others unaccounted for, but the number is small.
Windows does a reasonably good job of keeping the disk drive defragmented, but a third party defragmenter goes that little bit further.