«

»

Nov 27

avatar

Print this Post

The best Linux file system, Ext2 or Ext4?

Google, which knows a thing or two about fast systems has decided, for their purposes anyway, that Ext4 is the best and close to the fastest file system of all.

Google’s Michael Rubin, a senior staff engineer, wrote, “Google is currently in the middle of upgrading from ext2 to a more up to date file system. We ended up choosing ext4.”

Rubin then explains, “The driving performance reason to upgrade is that while ext2 had been ‘good enough’ for a very long time the metadata arrangement on a stale file system was leading to what we call “read inflation”. This is where we end up doing many seeks to read one block of data. In general latency from poor block allocation was causing performance hiccups.”

Ext2 is an older Linux file system. It’s still often used on flash drives, because it doesn’t write to the drive that often, and flash drives can be written to only a limited number of times before wearing out. But other than that, Ext2 was largely superseded by Ext3, which added journaling to Ext2. Journaling file systems keep a record, or journal, of changes to the main file system. With journaling, if the file system crashes, it’s much easier to restore it to a working condition without losing any data.

The newest member of the Ext file system, Ext4, became an official part of Linux last year with the release of the Linux 2.6.28 kernel. Since then, it’s become the default file system in some popular Linux distributions such as Fedora, and it’s now available on all distributions.

Ext4 enables faster disk performance and better drive space management than its predecessors. While it also includes journaling, you can turn that off for a modest speed boost. I’m sure Google was also interested in it because even without disabling journaling, Ext4 is a very fast file system, and it supports file systems of up to 1 EB (exabyte) and up to 16 TB (terabyte)-sized files.

But Google isn’t just using vanilla Ext4. The company recently hired Ted T’so, the well-known Linux kernel developer, who also happens to be the leading Ext4 programmer. I think I can safely say with Google supporting T’so and Ext4, this fast file system will only get faster still.

Comments

comments

About the author

avatar

Neo

Web Developer!

Permanent link to this article: http://blog.plite.org/neo_one2199/2012/11/27/which-one-is-the-best-linux-file-system-of-all-ext2-ext4/

%d bloggers like this: