Ext3 or ext4? That and upgrading to Jaunty

Today I somehow ended up on ext3’s wikipedia page, I wanted to check whether it’s really true that no defragmentation is needed like they say.

Apparently what they say is not completely true, from the wikipedia page:

While ext3 is more resistant to file fragmentation than the FAT filesystem, nonetheless ext3 filesystems can get fragmented over time.[19] Consequently the successor to the ext3 filesystem, ext4, includes a filesystem defragmentation utility and support for extents (contiguous file regions).

I tried Shake but it’s just a simple script that won’t let you know how much it actually managed to defragment, in other words, it didn’t help me actually get to the problem of knowing if defragging is really necessary on Linux.

Aha so ext4 seems to be a much better choice then, how to convert? Here is one solution which involves upgrading to Jaunty. Which I actually did, only to learn that

There are a number of proposals for an online defragmenter, but that support is not yet included in the mainline kernel. Even with the various techniques used to avoid fragmentation, a long lived file system does tend to become fragmented over time. Ext4 will have a tool which can defragment individual files or entire file systems.

from the ext4 article on wikipedia. This combined with the fact that people seem to be losing data a little bit too often is putting me off upgrading.

The data loss problems seem to be on their way to being fixed though, also from the ext4 article on wikipedia:

Many people find such a behavior unacceptable. A significant issue is that fixing the bug by using fsync more often could lead to severe performance penalties on ext3 filesystems mounted with the data=ordered flag (the default on most Linux distributions). Given that both file-systems will be in use for some time, this complicates matters enormously for end-user application developers. In response, Theodore Ts’o has written some patches for ext4 that cause it to limit its delayed allocation in these common cases. For a small cost in performance, this will significantly increase the chance that either version of the file will survive the crash.

I suppose the take away here is that you should read up on stuff before wasting your time taking action, for instance upgrading to Jaunty when you don’t really need to. Oh well, the upgrade went nicely anyway, haven’t noticed any problems yet.

Related Posts

Tags: , , , ,