Which Linux filesystem to choose for your PC? Ext2, Ext3, Ext4, ReiserFS (Reiser3), Reiser4, XFS, Btrfs

If you’re a Linux user, you’ve likely been asked at some point if you want Ext3, Ext4, XFS, ReiserFS, Btrfs, or one of many other filesystem acronyms. This choice confuses new and old users alike, and like all software, the options change as technology improves. Many people probably don’t care what filesystem they use as long as it’s stable and reasonably fast, but how do you know which one that is? This guide will attempt to cover the basic differences between the most common options, and provide the pros and cons of each choice.

Ext2

Ext2 is Linux’s “old standby” filesystem. It was the default for most of the major early Linux distributions. While it has been mostly supplanted by versions 3 and 4, ext2 is still popular on USB and other solid-state devices. This is because it does not have a journaling function, so it generally makes fewer reads and writes to the drive, effectively extending the life of the device.

Recommended Use: USB/Solid State Drives, or any cause where you need high stability with minimal reads/writes.

Ext3

The most notable difference between ext2 and ext3 was the introduction of journaling. In short, journaling filesystems are meant to recover more gracefully in the event of a system crash. Whenever you find yourself in doubt about which filesystem to use for Linux, ext3 is nearly always a good bet. It’s extremely mature, extremely well supported, and contains all the features you’re likely to need for a desktop OS.

Recommended Use: If you have no specific reason for another filesystem, ext3 is an excellent default.

Ext4

The most recent in the ext filesystem line, ext4 includes many major improvements over ext3 like larger filesystem support, faster checking, nanosecond timestamps, and verification of the journal through checksums. It’s backward and forward compatible with versions 2 and 3, so you can mount a ext2 or ext3 filesystem as ext4, and the other way around. You may however lose some of the benefits of the newer versions when mounting as the older. Many of the modern Linux distributions now offer ext4 during the install, and some are using it as the default.

Recommended Use: Ext4 should be stable enough for desktop and server needs. If your distribution offers it as an install choice, it should be a good choice for nearly any usage needs.

ReiserFS (Reiser3)

Before ext3, ReiserFS was the only journaling filesystem for Linux. It’s also notable for allowing live resizing of the filesystem. In some cases where many small files are involved, Reiserfs can outperform ext3 by a considerable margin. Reiser3 has problems, however when it comes to handling things like multicore PCs, as the design only allows for some operations to run one at a time.

Recommended Use: Interacting with small files on a single core system.

Reiser4

Reiser4 is intended to solve some of the problems with the Reiser3 implementation. Performance has improved, particularly with small files, and it includes support for plugins to handle things like compression and encryption. Reiser4 has a somewhat uncertain future. It has not yet been accepted into the main line Linux kernel, the lead designer is in prison, and the company developing it is not currently in business. Reiser4, if completed and fully polished, could be a fast and useful filesystem, but until it gains a foothold in the mainline kernel it may not be a good choice for long term use.

Recommended Use: Filesystem testing and development

XFS

XFS is packed full of cool features like guaranteed rate I/O, online resizing, built-in quota enforcement, and it can theoretically support filesystems up to 8 exabytes in size. It’s been used on Linux since about 2001, and is available as an install option on many popular Linux distributions. With variable block sizes, you can tune your system like a sliding scale to tweak for space efficiency or read performance.

Recommended Use: If you really like to tweak your system to meet your needs, XFS is a great way to go.

Btrfs

Btrfs is still in development, and may not yet be ready for production server use. That said, it has been included to some extent in the Linux kernel and is available as an install option in some distributions. Some of the interesting features include transparent compression, snapshots, cloning, and in-place conversion (with rollback) from ext3 and 4. According to the lead developer, Btrfs aims to “let Linux scale for the storage that will be available.” Btrfs, once completed and matured, will likely be a strong contender in the Linux filesystem world on both desktops and servers.

Recommended Use: Eventually, Btrfs should make for an excellent filesystem for servers and other high-bandwidth high-storage devices.

Advertisements

6 comments on “Which Linux filesystem to choose for your PC? Ext2, Ext3, Ext4, ReiserFS (Reiser3), Reiser4, XFS, Btrfs

  1. XFS is great, but I won’t suggest it for Desktop usage because it will erase file you’re woriking on in case of system crash (that may happens with user’s PCs)

    It will eventually wipe out your DE settings leaving your system in a broken state.

    So, I would surely suggest it on rock solid machine which you are reasonably sure won’t get any power outage or poweroff.

    • Good point! I forgot to mention that. You should only run XFS on a Desktop/Production computer if it has a good UPS that keeps it powered up in case of a power outage.

      Honestly, now that EXT4 is out, I’ve been using that and it’s great! Seems very fast, reliable, and everything else you could want from a filesystem. I haven’t done much research on EXT4 yet, but I know it’s definitely better than EXT3, or XFS just because I’ve run them all on this machine with the same Distro of Linux (openSUSE 10.3.1 x86_64) and EXT4 is the best by far. Not a single issue with it yet and my computer has been through numerous hardware failures due to a bad power supply. I got a new power supply and replaced a few components that fried and upgraded some stuff, and the same Distro of openSUSE Linux still boots and runs like a champ! I thought for sure the data on the drives would be corrupted… EXT4 is quite impressive with Journaling on when you look at that aspect of it.

      • Yeah I’m glad that EXT4 was actually finished and put into production considering what happened with the creator. I suppose others picked up where he left off and finished it up. I run EXT4 now and I love it. Best filesystem ever if you want something fast and reliable.

        Thanks for the feedback!

  2. what’s wrong with ext4 creator? maybe you’re confusing it with ReiserFS’s creator Hans Reiser, which actually had some bad problems…

  3. “Before Linux 2.6.33, ReiserFS heavily used the big kernel lock (BKL) — a global kernel-wide lock — which does not scale very well for systems with multiple cores, as the critical code parts are only ever executed by one core at a time.” from http://en.wikipedia.org/wiki/ReiserFS

    But I would not use it on systems because it is maintained by one developer as I understand it.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s