Good Article: How to defrag a Linux system.

Optimize your system for ultimate performance.

Moderators: khz, MattKingUSA

User avatar
English Guy
Established Member
Posts: 473
Joined: Wed Oct 17, 2012 7:28 pm
Location: England

Good Article: How to defrag a Linux system.

Postby English Guy » Tue Jun 16, 2015 1:28 pm

Best article I have ever seen.

Explains how to work out if you need to, and if so how to do it using e4defrag which is already installed on many Linux systems.

https://www.howtoforge.com/tutorial/linux-filesystem-defrag/

User avatar
bhilmers
Established Member
Posts: 157
Joined: Mon Apr 23, 2012 11:44 pm

Re: Good Article: How to defrag a Linux system.

Postby bhilmers » Tue Jun 16, 2015 3:00 pm

Wow, thanks for this. I do notice performance issues over time so I usually just do a full reinstall about every two years. This might save me some trouble.

asbak
Established Member
Posts: 647
Joined: Thu Sep 11, 2014 3:04 pm

Re: Good Article: How to defrag a Linux system.

Postby asbak » Wed Jun 17, 2015 7:45 pm

As the article notes at the end, you don't want to be doing this if you have a SSD. It'll only reduce its lifespan.

User avatar
raboof
Established Member
Posts: 1660
Joined: Tue Apr 08, 2008 11:58 am
Location: Deventer, NL
Contact:

Re: Good Article: How to defrag a Linux system.

Postby raboof » Thu Jun 18, 2015 10:32 am

Also, don't forget to use "sudo e4defrag -c /location or /dev/device" to check whether a defrag is at all useful - I wonder if that occurs a lot.

User avatar
English Guy
Established Member
Posts: 473
Joined: Wed Oct 17, 2012 7:28 pm
Location: England

Re: Good Article: How to defrag a Linux system.

Postby English Guy » Thu Jun 18, 2015 9:08 pm

I actually did this on my office machine, which only has a 70GB hard drive which is constantly near full and has had the same install since 2013. A lot of files were fine but some of the larger files, music or ISO, were fragmented. In the end I just ran it on the entire system as being easier than checking individual files.

It has made it noticeably snappier when you open a file manager and I would consider doing it again in similar circumstances.

bazsound
Established Member
Posts: 480
Joined: Sat Aug 03, 2013 11:46 am

Re: Good Article: How to defrag a Linux system.

Postby bazsound » Sat Jun 27, 2015 9:42 pm

As far as I understand it Linux file systems are designed not to fragment. Not like fat systems do.


There may be some fragmentation but its minimal.

Defraging and saying yeah its better isn't valid. Many things can be done and u tgjnk its better but its not.

Placebo.

I've ran my Linux system for more than 2 years with many upgrades added packages removed stuff and never noticed any slowdown. Even on a 40gb drive I filled till it was full.

User avatar
thetotalchaos
Established Member
Posts: 157
Joined: Mon Sep 29, 2014 8:29 pm
Contact:

Re: Good Article: How to defrag a Linux system.

Postby thetotalchaos » Mon Jun 29, 2015 6:50 am

e4defrag can be useful for highly loaded Linux servers that use ext4 file system. I don't think that should be a concern for the desktop users, even those on Debian or Ubuntu LTS that doesn't reinstall for years. Note however that ext3 doesn't need defragmentation tools, because while ext4 allows some minimal fragmentation ext3 doesn't. So i prefer to keep my data hard drive on ext3 partition, minding the fact that ext3 has also better and more mature recovery tools. But i am not afraid to use ext4 for my OS drive/partition, because its more likely to reinstall long before i ever need to defrag the system. Plus ext4 has its advantages :wink:
Check out my latest music album The girl with the stars in her eyes
https://totalchaos-music.bandcamp.com/album/the-girl-with-the-stars-in-her-eyes

User avatar
English Guy
Established Member
Posts: 473
Joined: Wed Oct 17, 2012 7:28 pm
Location: England

Re: Good Article: How to defrag a Linux system.

Postby English Guy » Mon Jun 29, 2015 8:02 pm

bazsound wrote:As far as I understand it Linux file systems are designed not to fragment. Not like fat systems do.


There may be some fragmentation but its minimal.

Defraging and saying yeah its better isn't valid. Many things can be done and u tgjnk its better but its not.

Placebo.

I've ran my Linux system for more than 2 years with many upgrades added packages removed stuff and never noticed any slowdown. Even on a 40gb drive I filled till it was full.


Read the article and the previous comments before commenting please. The utility under discussion has the ability to measure fragmentation, imagination is not required.


Return to “System Tuning and Configuration”

Who is online

Users browsing this forum: No registered users and 1 guest