Defrag tool for Mint?

Chat about anything related to Linux Mint

Does Mint need a defrag tool&

It`d be great to have any tool to control and avoid fragmentation, so YES
12
32%
Files don`t fragment in Linux, so NO
24
65%
I dont have any opinion, so I DON`T CARE
1
3%
 
Total votes : 37

Re: Defrag tool for Mint?

Postby jamael7 on Tue Oct 30, 2012 3:41 pm

I just found defrag tool for Ubuntu: https://apps.ubuntu.com/cat/applications/hdd-ranger/

Maybe its also works with Mint, anyone tested it?
jamael7
Level 1
Level 1
 
Posts: 1
Joined: Tue Oct 30, 2012 3:35 pm

Linux Mint is funded by ads and donations.
 

Re: Defrag tool for Mint?

Postby bimsebasse on Fri Nov 02, 2012 12:00 pm

$8 for something you don't need.
Thank you for this thread. That’s all I can say. You most definitely have made this forum into something special. You clearly know what you are doing, you’ve covered so many bases. Thanks!
User avatar
bimsebasse
Level 7
Level 7
 
Posts: 1709
Joined: Fri Nov 11, 2011 10:21 am
Location: Scandinavia

Re: Defrag tool for Mint?

Postby lexon on Fri Nov 02, 2012 1:49 pm

I have been using Linux since Dec. 2003. There is no need to defrag but everyone is entitled to their own version of reality.
L
Lindows, Linspire, Freespire, Ubuntu, Mint 15 Cinnamon, Mint 16 XFCE, Mint 17 Cinnamon 64 bit.
lexon
Level 5
Level 5
 
Posts: 712
Joined: Sat Jan 31, 2009 10:53 pm
Location: MA USA

Re: Defrag tool for Mint?

Postby igor83 on Tue Nov 06, 2012 2:16 am

eanfrid wrote:I agree with DrHu. Defragmentation tools are not needed on modern file systems (and modern hardware). Fragmentation occurs though, but its impact is very negligible.

Indeed, unless your use any version of FAT or early releases of NTFS, you don't have to defrag anything because access times, read/write speeds, buffers and caches on today's devices and computers combined with modern file systems performances completely override the need for it.

Defrag tools are now just placebos, either on Windows or Linux.


Do you think it is faster for a r/w head to read sectors of a file from one contiguous location on the disk or from 99,000 random spots spread all over the disk platter? The head is going to have to physically move a greater distance resulting in what is known as "thrashing" which is audible on some drives (Hitatchi comes to mind) and yes, this does slow down the process of reading or writing regardless of the cache size. OF course on SSD this is a nonissue, but most users today still use mechanical drives and for large capacity, there isn't a cost-effective alternative yet.
My desktop runs 64-bit Kubuntu 13.04, my htpc runs 64-bit Linux Mint Nadia Xfce, my answering machine runs 64-bit windows 7, and my laptop runs 64-bit Linux Mint Nadia KDE. Each seems suited to its purpose.
Image
User avatar
igor83
Level 4
Level 4
 
Posts: 317
Joined: Wed Aug 08, 2012 8:23 pm

Re: Defrag tool for Mint?

Postby eanfrid on Tue Nov 06, 2012 3:46 am

You take an example of absurdly high level of fragmentation, close to 100%, to make your point :) In the real life, this is no point: cache and buffers win the game the very most of the time. However, there is always a performance difference between reading/writing many small files in a row and reading/writing only one big file but this is an I/O performance, file system features and access time matter, not a single-file fragmentation matter, whatever are the OS and the underlying storage technology.
Main desktop: Debian GNU/Linux Wheezy 64bit w/custom 3.14 longterm kernel - MATE 1.8.1
(i5 2400@3.7GHz - 16GB DDR3 - HD6770 w/radeon driver - SSD+RAID1)
True private storage on SpiderOak
User avatar
eanfrid
Level 7
Level 7
 
Posts: 1843
Joined: Mon Apr 30, 2012 2:49 am
Location: FR

Re: Defrag tool for Mint?

Postby webslave on Tue Nov 06, 2012 5:53 am

As for defragging NTFS from Linux I haven't been able to find much. But with ext4 there is a program you can use. Just simple run
Code: Select all
e4defrag /location


I found a good article about it as I was wondering the same thing myself.
http://www.hecticgeek.com/2012/10/defragment-ext4-file-systems-using-e4defrag-ubuntu/
webslave
Level 1
Level 1
 
Posts: 14
Joined: Thu Aug 13, 2009 12:35 pm

Re: Defrag tool for Mint?

Postby Flemur on Tue Nov 06, 2012 12:08 pm

"Still though, ex-Windows habits aside, I am finding it hard to accept that the Linux file-system is totally immune to fragmentation."

Don't worry, linux ext filesystems really do fragment. It's pretty much impossible not to do so to some extent.

And because of this, there's the e4defrag program, which will (rather crudely) take care of some of it.
Mint 17/Xfce/fluxbox & another Mint 17/Xfce/fluxbox
User avatar
Flemur
Level 5
Level 5
 
Posts: 866
Joined: Mon Aug 20, 2012 9:41 pm

Re: Defrag tool for Mint?

Postby igor83 on Tue Nov 06, 2012 12:38 pm

eanfrid wrote:You take an example of absurdly high level of fragmentation, close to 100%, to make your point :) In the real life, this is no point: cache and buffers win the game the very most of the time. However, there is always a performance difference between reading/writing many small files in a row and reading/writing only one big file but this is an I/O performance, file system features and access time matter, not a single-file fragmentation matter, whatever are the OS and the underlying storage technology.


I have seen files with fragmentation levels on my own desktop in the tens of thousands and it is easy to imagine a large database file with continual reads and writes getting ~ 99,000 fragments. Depends on your OS whether this is going to be a big issue, but on Windows/NTFS it remains one. Out at work I had a friend who thought the same as you, swore up and down that fragmentation didn't matter anymore in our grand new modern era of generous hard drive caches. He reversed his opinion the next day after defragging his drive at home. For Linux I wouldn't worry too much about it but on a Windows system, particularly XP or earlier, then I would suggest performing a little experiment before drawing any conclusion based on cache size.

btw here is a good article on why defragmentation is a problem in Windows XP / NTFS but not in Linux. Personally I don't plan to ever defrag in Linux. Fragmentation Resistance is one of the eternal advantages Linux has enjoyed over Windows.
My desktop runs 64-bit Kubuntu 13.04, my htpc runs 64-bit Linux Mint Nadia Xfce, my answering machine runs 64-bit windows 7, and my laptop runs 64-bit Linux Mint Nadia KDE. Each seems suited to its purpose.
Image
User avatar
igor83
Level 4
Level 4
 
Posts: 317
Joined: Wed Aug 08, 2012 8:23 pm

Re: Defrag tool for Mint?

Postby eanfrid on Tue Nov 06, 2012 12:59 pm

I was talking about OS/FS cache/buffers in RAM, not about drive cache :) Anyway talking about the need of a defragmention tool under any modern OS (sorry XP is far from modern) is like talking about religion. I understand your point.

As yours, my point is based on my own professional experience in IT. Most of the time, under mainstream use (desktop - gaming), defragmentation tools are not needed at all. For servers and users manipulating/editing huge files (architects, video editors and so on), fragmentation can indeed be a problem because the best friend of fragmentation is low available disk space. In either case, most of the issues are leveled with more RAM for caching and faster/bigger disks. But once again, it is not a common use of a modern desktop computer.

Edit: BTW each time I try "e4defrag -c" on my machines, it never tells me I have to defrag anything :)
Main desktop: Debian GNU/Linux Wheezy 64bit w/custom 3.14 longterm kernel - MATE 1.8.1
(i5 2400@3.7GHz - 16GB DDR3 - HD6770 w/radeon driver - SSD+RAID1)
True private storage on SpiderOak
User avatar
eanfrid
Level 7
Level 7
 
Posts: 1843
Joined: Mon Apr 30, 2012 2:49 am
Location: FR

Re: Defrag tool for Mint?

Postby igor83 on Tue Nov 06, 2012 7:09 pm

eanfrid wrote:I was talking about OS/FS cache/buffers in RAM, not about drive cache :) Anyway talking about the need of a defragmention tool under any modern OS (sorry XP is far from modern) is like talking about religion. I understand your point.

As yours, my point is based on my own professional experience in IT. Most of the time, under mainstream use (desktop - gaming), defragmentation tools are not needed at all. For servers and users manipulating/editing huge files (architects, video editors and so on), fragmentation can indeed be a problem because the best friend of fragmentation is low available disk space. In either case, most of the issues are leveled with more RAM for caching and faster/bigger disks. But once again, it is not a common use of a modern desktop computer.

Edit: BTW each time I try "e4defrag -c" on my machines, it never tells me I have to defrag anything :)


I think we're on the same page here. In regards to Windows XP I've still got two desktops running well with XP and no problems and some legacy software I don't want to discard. The main reason I moved a desktop to Linux was to get 64-bit support which allows partitioning a 2.5tb drive. Windows XP 32 bit couldn't handle it. And besides I think it's a good idea to diversify where operating systems are concerned. I'm not wild about the direction Microsoft is going and am curious about where Linux may be headed, so decided to catch a ride on this train.

btw sounds like you're a defragmentation agnostic based on running "e4defrag -c". Even I have not done that on my Linux box. I'm a defragmentation atheist where Linux is concerned.

The ext4 file system seems more robust than NTFS, although I'm curious to try btfrs (sp?) when it gains more acceptance, utilities, and stability and so on.
My desktop runs 64-bit Kubuntu 13.04, my htpc runs 64-bit Linux Mint Nadia Xfce, my answering machine runs 64-bit windows 7, and my laptop runs 64-bit Linux Mint Nadia KDE. Each seems suited to its purpose.
Image
User avatar
igor83
Level 4
Level 4
 
Posts: 317
Joined: Wed Aug 08, 2012 8:23 pm

Re: Defrag tool for Mint?

Postby eanfrid on Tue Nov 06, 2012 7:45 pm

Regarding my own use, I exclusively run Linux - mostly Debian or Debian-based, plus some BSD machines however - since more than 10 years. I never had to use any defragmentation tool :) Since I dropped down the good old ext3 for ext4, I just ran e4defrag only a handful of times to check what it would do... exactly what I first guessed i.e nothing :lol:

Edit: NTFS is not as good as ext4 for maintaining a low level of fragmentation but recent Windows(tm) OS, starting from Vista, do a better job with NTFS than previous versions and then you can live with "no defrag" on a common Windows desktop too, as far as you avoid native NTFS file compression.
Main desktop: Debian GNU/Linux Wheezy 64bit w/custom 3.14 longterm kernel - MATE 1.8.1
(i5 2400@3.7GHz - 16GB DDR3 - HD6770 w/radeon driver - SSD+RAID1)
True private storage on SpiderOak
User avatar
eanfrid
Level 7
Level 7
 
Posts: 1843
Joined: Mon Apr 30, 2012 2:49 am
Location: FR

"Linux does not fragment files" a modern myth

Postby andros on Sat Jan 05, 2013 9:25 am

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.
andros
Level 1
Level 1
 
Posts: 3
Joined: Sat Jan 05, 2013 7:35 am

Re: Defrag tool for Mint?

Postby eanfrid on Sun Jan 06, 2013 6:34 am

Fragmentation is inherent to any file-system activity. Whatever OS you use. But native Linux file-systems handle file fragmentation in a better way than Windows ever did. Fragmentation is generally kept to an insignificant value under Linux and does not hamper normal operations. So, if fragmentation gets unnoticed, why bother with a defrag tool ? (this is what this poll means, indeed).

As I said before, there are always exceptions, on databases servers, on very large files operations or before resizing a partition for example, where a defrag tool can sometimes be useful. But the true responsible for file fragmentation is the lack of disk space: the more your HDD partition gets filled, the more your files will get fragmented, beginning with the bigger ones. Compared to HDD, SSD are clearly the winners on this part, too.
Main desktop: Debian GNU/Linux Wheezy 64bit w/custom 3.14 longterm kernel - MATE 1.8.1
(i5 2400@3.7GHz - 16GB DDR3 - HD6770 w/radeon driver - SSD+RAID1)
True private storage on SpiderOak
User avatar
eanfrid
Level 7
Level 7
 
Posts: 1843
Joined: Mon Apr 30, 2012 2:49 am
Location: FR

Re: Defrag tool for Mint?

Postby andros on Sun Jan 06, 2013 7:46 am

Fragmentation is inherent to any file-system activity. Whatever OS you use. But native Linux file-systems handle file fragmentation in a better way than Windows ever did.

Exactly because of that i am using SHAKE. Please read what SHAKE does:
Shake is a defragmenter that runs in userspace, without the need of patching the kernel and while the system is used (for now, on GNU/Linux only).
There is nothing magic in that : it just works by rewriting fragmented files. But it has some heuristics that could make it more efficient than other tools, including defrag and, maybe, xfs_fsr.

It just does it job by coping the files again. Because of what you described above, this is enough to defragment the files in most cases, because of the file system behavior. As explained in the article i have linked to before.
.

Fragmentation is generally kept to an insignificant value under Linux and does not hamper normal operations.
So, if fragmentation gets unnoticed, why bother with a defrag tool ? (this is what this poll means, indeed).

This is not true, it gets noticed, it depends how much you use the system! On windows systems it is the same, it depends also on the use case. The only difference is, that Linux file systems act more intelligent from the beginning on.
As I said before, there are always exceptions, on databases servers, on very large files operations or before resizing a partition for example, where a defrag tool can sometimes be useful. But the true responsible for file fragmentation is the lack of disk space: the more your HDD partition gets filled, the more your files will get fragmented, beginning with the bigger ones. Compared to HDD, SSD are clearly the winners on this part, too.


So, you say it your self. When disk space gets low, it is impossible to operate on files without to fragment them.

But what amount of space is low?

Think for your self, when Linux is trying to order the files all over the free space on a partition, you get relatively fast on he edges of physics when you have enough files who change in size.

My home partition for example has 30 % free space left.

But it WAS extremely fragmented which was a big performance impact.

What do you think: When i can not use more than 50 % of my disk to avoid fragmenting, who failed her, me or Linux?

Or should i copy over the whole disk to another disk with the same size and back to to defragment it?

Or should i just use SHAKE?
andros
Level 1
Level 1
 
Posts: 3
Joined: Sat Jan 05, 2013 7:35 am

Re: Defrag tool for Mint?

Postby eanfrid on Sun Jan 06, 2013 3:14 pm

So i have for example an Thunderbird profile which is alone 21GB in size
:shock: Thunderbird is not a parangon of optimized performance and such a huge profile size is playing with fire, for sure.

Whichever OS you run, low disk space is the best friend of fragmentation. Linux or not. Regarding performance, Linux file-systems can cope with lower available disk space than Windows does but Linux is not a magical device. Further if the available RAM you have for system disk caching on your computer gets too low, you will also notice performance drops long before anything due to file fragmentation.
Main desktop: Debian GNU/Linux Wheezy 64bit w/custom 3.14 longterm kernel - MATE 1.8.1
(i5 2400@3.7GHz - 16GB DDR3 - HD6770 w/radeon driver - SSD+RAID1)
True private storage on SpiderOak
User avatar
eanfrid
Level 7
Level 7
 
Posts: 1843
Joined: Mon Apr 30, 2012 2:49 am
Location: FR

Re: Defrag tool for Mint?

Postby andros on Sun Jan 06, 2013 3:39 pm

Thunderbird is not a parangon of optimized performance, for sure.


Yeap here we are again.

Yes you are right, and in the same oucasion my grand ma is not a circulator turbine.
andros
Level 1
Level 1
 
Posts: 3
Joined: Sat Jan 05, 2013 7:35 am

Linux Mint is funded by ads and donations.
 
Previous

Return to Chat about Linux Mint

Who is online

Users browsing this forum: No registered users and 0 guests