I have searched about this topic shortly and it was incredible to me, how this modern myth, that Linux systems don't need any defragmentation at all has spread.
Here is an good article about what is the Linux approach to prevent fragmentation:
Why doesn't Linux need defragmenting?
But, this article assumes that you just don't need any kind of defragmentation software on Linux at any given time.
I just can't believe how ignorant this message is, and how it has spread the word all over the Internet!?
On many occasions, (when you not a power user) this is maybe true, but on many other occasion this is just wrong.
It happens to me that i have to use my ext4 home partition a little bit extensively.
So i have for example an Thunderbird profile which is alone 21GB in size, and i am getting ~100MB of new mails on a daily basis. So my Thunderbird profile alone does a tremendous job of increasing and decreasing database files for all my Thunderbird folders. Which are also get sometimes compressed and therefore another time change their sizes.
And Thunderbird is only one thing that i have stored on this partition. There are some Video stuff i am working on, and so forth...
Last year i just didn't think about defragmenting for about 6 month. In the end pretty much every folder that i am used in Thunderbird became tremendously slow. So slow that when you clicked on one mail it took up to 5 to 12 seconds just to display it.
So what have i done?
I am using
SHAKE do defragment Linux for some time no, so i defragmented my whole system with it.
Result is that every mail in Thunderbird now opens in 0.5 seconds instead of 12!
And this is only one example. The whole files system becomes very slow when you really use it and have many files that are copied over, back and forth or change in size regularly.
On my root partition with /etc /usr, /var, /bin, .. there is not much fragmentation going on, but on my big data partitions like /home there is allot going on!
I called shake like this "shake --old 0 --bigsize 0 --smallsize 0 -v ." to make sure it would defrag every thing.
With -v you can see if and how many fragments one file has. In my Thunderbird profile folder there were many files fragmented in to hundreds of parts.
So it is pretty much idiotic for me to say Linux does not fragment anything.
It does.
Linux is not some answer for everything. Linux is bound to the physical limitations in this universe as well as everything else is!
If there is not enough room for Linux to handle it "the Linux way", there is always the possibility that you have fragments on your HDD.
I have never seen an file system, which can avoid the problem of fragmentation completely.