Linux EXT4 Filesystem showing impressive speeds

By apexwm, 26 October, 2010 19:50

More and more articles have been appearing on the EXT4 filesystem. In fact, the article that really caught my eye was one recently regarding the speed of using EXT4 on flash media. The benchmarks posted speeds of EXT4, showing it excelling over filesystems like FAT32 and NTFS by considerable amounts. As this article above states, many flash drives come with Microsoft's FAT32 which is nice because of compatibility. Most operating systems can read/write FAT32. But, Microsoft has recently started to bring up patent threats against the use of FAT32, which is one reason I have started to steer away from it. Also, it has a 2 GB limit on file sizes. Even though FAT32 is more compatible, I can see the benefits of using EXT4, especially on small and slower devices like flash media. Plus, as flash drives have become larger, the 2 GB limit of FAT32 will start to be more of a show stopper, especially when working with large video files, etc. And unfortunately, NTFS support is still scattered, because it is kept behind closed doors by Microsoft.

If you are mainly using Linux systems, I'd strongly recommend the EXT4 filesystem for disks as well as flash media anyway. It's been around for a while now, and it is considered stable. Even though the tests are showing microscopic differences in speed between EXT4 and other filesystems, there are added advantages of an efficient filesystem like EXT4 besides speed alone. Personally, getting rid of garbage filesystems like FAT32 or NTFS which are cluttered and need defragmenting, as well as being known for file corruption, is just one example. The EXT3/EXT4 filesystems are complete journalling filesystems, and do not need defragmenting utilities to be run on them like FAT32 and NTFS.

With Linux distributions (Fedora being one that boasts fast booting) reaching record boot speeds with each new release, I'd have to believe that EXT4 needs to take some of the credit. It's used by default with Fedora and other distributions now. Great stuff as usual here. Also, if you are really worried about compatibility with Windows systems, there are EXT4 filesystem drivers available for Windows.


Talkback

Wasn't there an issue with ext3 filesystem thrashing flash media, so much so it was recommended to use ext2, and wasn't this something to do with it being a journaled system? Not really my bag, so don't know the ins and outs but good to hear that ext4 seems to work betterer.
Jake Rayson 27 October, 2010 10:47
Report offensive content Reply


Hi Jake, I had not heard that. And I never did try using EXT3 on flash media before though. I have seen issues before where people try to use flash media in USB 1.0 slots. Don't expect record speeds there! I didn't think journalling had very much overhead, as EXT3 had an improvement on performance over EXT2. But that's an interesting point you bring up!
apexwm 27 October, 2010 13:18
Edit Delete Report offensive content Reply


I installed Ubuntu 10.10 on a 16Gb USB flash drive using the Ext4 file system and found the performance abysmal. I blogged about it here and was advised that the Ext4 file system did not perform well on USB flash drives because of the journaling.

Subsequently, I installed Pinguy Linux (based on Ubuntu) on a separate partition on the same USB flash drive using the Ext2 file system and noticed a significant boost in performance.

See my blog here:

http://www.zdnet.co.uk/blogs/moleys-musings-10008506/ubuntu-maveric-meerkat-10018734/

and tkarakashian's informed response quoted below

"You do not want to use a journaling file system on a flash drive unless you're going to tweak the mounting a little bit to reduce disk writes and thus increase the lifespan of your drive. Also, you need to make sure to align the file system with a write erase block. Again, this helps with the longevity of the drive, but I've also found that correctly aligning the file system does help with performance somewhat. Here's a couple of articles that should help you achieve your goals:

The first is about aligning to erase boundaries:

http://thunk.org/tytso/blog/2009/02/20/aligning-filesystems-to-an-ssds-erase-block-size/

The second is a great collection of tips for running Linux off of a flash drive:

http://www.cyrius.com/debian/nslu2/linux-on-flash.html

Hope that helps!
Moley 27 October, 2010 14:40
Report offensive content Reply


Thanks Moley. I have used EXT4 on external USB drives and have had excellent performance, but not flash media. I'll have to try my own tests and see if I have the issues you mentioned.
apexwm 27 October, 2010 16:33
Edit Delete Report offensive content Reply


Moley is correct. Journaling should *not* be used on flash drives. Due to the way journaling writes to the drive it will *greatly* reduce the life of the drive. The degree to which it reduces the life of the drive and the degree to which it reduces the performance of the drive will depend on the quality of the drive. Low quality "slow" flash drives will be especially impacted by journaling. Ext 2 is an *excellent* choice for use with flash drives and runs rings around fat and ntfs. The upcoming btrfs is expected to have a flash drive option built into it that will make it the choice for flash drives as well as conventional drives when it is fully mature.
ghmitch 28 October, 2010 03:41
Report offensive content Reply


So, does ext4 finally support unicode filenames and stuff? No? Oh, forgot that Linux doesn't support unicode as such either. Back to the 80's then.

(And no, using UTF-8 for filenames and trusting that applications are compiled to use UTF-8 too is not a solution)
Getaclueapexwm 22 January, 2011 21:59
Report offensive content Reply