Speed up your Mac by defragmenting the disk drive

Everyone knows that Windows computers slow down over time because the files on the disk drive become fragmented. Everyone knows that the Mac’s disk never needs defragmenting. But is this true? No.

If you have a solid state disk (SSD) in your Mac (or Windows PC), then fragmentation does not affect performance. This is a problem that affects traditional mechanical disk drives. The trend in new computers is towards having SSDs because they are faster, lighter, use less power and multitask better. However, most new iMac’s still have hard disk drives and many older MacBooks have them too. There are still a lot of mechanical disk drives in use. 

Modern disk drives are really fast compared to a decade ago and modern operating systems try to minimise fragmentation automatically. The problem is not as bad as it used to be, but Mac disk drives still become fragmented and defragmenting them can boost the performance.

What is disk fragmentation?

Suppose you save three files to the disk drive, file1, file2 and file3. You then delete file2. The disk now has file one, some empty space and then file2. If you then save another file and it is too big to fit in the space, it might be split in two, part of it in the empty space and the rest of it saved elsewhere. An intelligent filing system could look for a large enough space to save the file without splitting it, avoiding fragmentation.

Another way in in which files become fragmented is when they grow. Suppose you have file1, file2 and file3 on the disk drive. File2 could be a video say, and you edit the video, paste in some extra scenes making it longer and then save it to disk. File2 has no space to expand because it is immediately followed by file3, so the extra is saved elsewhere. You then get file1, file2, file3, file2-continued. This type of fragmentation is next to impossible to avoid.

Fragmentation does indeed occur on Mac disk drives, contrary to what some people say.

Defragmenting the disk involves moving files that are fragmented to somewhere else on the disk where they will fit without being split. Blocks of empty space on the disk drive are eliminated by packing all the files together at the start of the disk too. The result is more efficient use of the disk and better read and write speeds.

Prepare the disk

Before the disk is defragmented, it is best to check that the disk drive is healthy and free of errors. Go to the Applications folder, open the Utilities folder and run Disk Utility. Select the Mac’s disk drive on the left and click Verify Disk followed by Repair Disk Permissions.

Disk Utility in OS X

There always seems to be a few minor errors and they are best fixed before defragging. There is no point in defragging the Trash, so right (or Ctrl) click it in the Dock and empty it.

Defrag the disk

Unfortunately, OS X does not have a disk defragmenter and there are no free ones you can download and install. To optimise the disk contents and boost the drive’s speed you are going to have to buy one. I am going to use the disk defragmenter in Stellar Drive ToolBox, which is a collection of tools for cleaning, optimising, erasing and tuning the disk.

Select Drive Defrag in the list of tools on the left and click the Continue button.

Stellar Drive ToolBox

Select a volume on the left and it is scanned for fragmented files. When it has finished, select the Files tab at the top, click the Fragments heading in the fourth column in the table to sort by number of fragments and you can see the most fragmented files at the top.

Defragment the disk

Here you can see that on this MacBook that there are four files that are split into over 200 fragments. When someone says that Mac disks don’t suffer from fragmentation, just get them to try a utility like this.

Files can be selected using the tick boxes to the left of the filenames and then the Defrag Files button at the top can be used to defrag them.

That is fine if you want to defrag just the worst files, but to optimise the whole disk, select the Layout tab. Red blocks show fragmented files. There is a little menu in the top left corner that enables you to select from four different defragmentation methods. Use Quick Defrag if you are in a hurry, but if you have plenty of time, use the Full Defrag option.

Stellar Drive ToolBox

There is a snag. Defragging the boot volume is not possible, probably because many operating system files are in use. You can defrag any other volume though. To defrag the boot volume you need to boot the Mac from a DVD. Stellar provides a facility to create a disc image that you can burn to a DVD when you select the boot volume for defragging. Boot with it and defrag the startup volume.




Add new comment

By submitting this form, you accept the Mollom privacy policy.

Related items you will like...