Friday, January 1, 2021

Defrag Linux and Speed Up Your Computer*

*Terms and conditions apply.

When I used to use Windows (XP), I used to spend a lot of time looking at little coloured blocks moving around the screen as I ran a defragmentation utility every week or so.

I recently came across an online article which mentioned tools to defragment the Linux Ext4 file system, used in many Linux distributions up to now (Fedora is moving to the Btrfs system, apparently). The article I read actually compared Btrfs to Ext4, and mentioned that Ext4 is "effective at preventing fragmentation over extended periods of time". Fedora Magazine.

I found a useful article on how to use the defragmentation tool in Linux, and gave it a go. I used the command to get a fragmentation report:

# e4defrag -c /

Result: I don't need to defragment, no moving coloured blocks, Linux is boring.

Quite possibly, so is Windows now. Does it still get fragmented? I don't know.

When can Ext4 become fragmented? When the HD is very full, seems to be the answer, according to How-To Geek, which also has a good simple explanation of why Ext4 doesn't usually get fragmented.

Checking in my notebook, I noticed that I'd made a note of this command previously, and forgotten about it, so I thought I would do a post on the subject.

I couldn't resist a click-bait title: obviously you are not going to speed up your computer doing this, unless, possibly, your HD is very full, in which case a better solution might be to declutter some data to an external drive.

File under: not really relevant.



No comments:

Post a Comment