Sunday, October 12, 2008

EXT3, EXT4, JFS, XFS Weekend Encounters

Sometimes I'm a gluten for punishment when it comes to technology. My self-inflicted punishment this weekend was spending time formatting and copying data using xfs, jfs, and ext4 filesystems under Linux.

It started out several days ago when I got the itch to move from ext3 to a different filesystem to test the performance. I've been through this before, but it had been a while. I was tempted to try ext4 right off the bat, but decided to try xfs. I ran xfs for several days, and I really liked it. However, in an effort to fix my sound card not living up to Fedora's 10 promise of glitch-free audio ( this is another story in and of itself ), I had to hard-reboot my computer and ended up with a 0-length file on an opened file. This is not unusual for an unclean shutdown of xfs, so I wasn't mad, but decided to try jfs. A few reboots later, and a lot of time sitting around waiting to backup/restore a 90+GB root partition, jfs was up an running on the root partition. No problems, but I then came across the ext3 options for "xfs-like and jfs-like" behaviour by adding data=writeback,nobh,commit=30 mount options. So, back to ext3 with those options, and I was impressed. No official benchmarks to post, but it felt good and I was back on an ext filesystem.

After running ext3 for a while, I realized Fedora Rawhide had moved from ext4dev ( the pre-release ) to ext4. Why not, I already had the data backed up, so...reboot, rsync, mkfs.ext4, and a cp and I was back up running ext4 with the "data=writeback,nobh,commit=30" mount options.

While these mount options are a little more risky on hard reboots, it appears the worst that should happen is stale data--not a 0 byte file like xfs was so kind to produce. I can live with old data, but corrupt data is where I draw the line.

So far, the ext4 is blazing fast. It's running over a software raid 0 config. On the first reboot, the raid device forced a fsck. I was very impressed the 150GB partition fsck finished in less than a minute--compared to the several minute fsck the ext3 partition took on it's initial boot.

ext4 is the filesystem of choice for me now.

1 comment:

3vi1 said...

Ironically, I found your blog while investigating a problem with Ext4 that causes 0-byte files on unclean shutdown. Looks like many people are seeing this same issue:

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/317781