Tools for defragging Linux

Tidy Up

Article from Issue 178/2015
Author(s):

You may not need to defrag your Linux system very often, but the tools are waiting when the need arises.

Everyone knows that defragmenting a filesystem on Linux is unnecessary. However, like much of what everyone knows, that idea is only partly correct. Why else would Linux include utilities such as e2freefrag, filefrag, e4defrag, and fsck to allow you to check fragmentation and fix it?

Defragmenting is a means of improving how files are stored on a hard drive. In a filesystem like FAT32, files are written as close to the start of the disk as possible for quick access. However, when existing files are edited, this tactic often means there is no room to store the changes in the same space as the original file. Instead, the changes have to be stored someplace else, which causes defragmentation and can slow the system.

By contrast, Linux's ext2, ext3, and ext4 filesystems write new files with space between them. When a file is edited, the drive usually has space to store all the contents together, using space immediately after the original file. As a result, fragmentation is minimal under many conditions, so defragging does little to improve performance. In fact, if you have a true solid state drive – as opposed to the hybrid drives often sold as solid state – defragmenting becomes an obsolete concern on any operating system.

[...]

Use Express-Checkout link below to read the full article (PDF).

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News