Ext4 vs. Btrfs

Quite honestly, one of the last things people look at is which file system is being used. Windows and Mac OS X users have even less reason to look, because they really have only one choice for their system – NTFS and HFS+, respectively. Linux, on the other hand, has plenty of different file system options, with the current default being ext4.

However, there’s been another push to change the file system to something called btrfs. But what makes btrfs better, and when will we see distributions making the change?


What Do File Systems Do?

In case you’re unfamiliar about what file systems actually do, it’s pretty simple when summarized. File systems are used to control how data is stored after a program is no longer using it, what other information – known as metadata – is attached to the data itself, how access to data is controlled, and so on.

It doesn’t sound like an easy thing to program, and it’s definitely not. File systems are still continually being revised to include more functionality while becoming more efficient in what it needs to do. Therefore, although it’s a basic necessity for all computers, it’s not quite as basic as it sounds.


Why Switch File Systems?

ext4 has been another improvement to the ext3 file system, which was an improvement over the ext2 file system. While the ext4 is a very solid file system which has been the default choice for almost all distributions for the past few years, it is made from an aging code base. Additionally, Linux users are seeking many new different features in file systems which ext4 does not handle on its own.

There is software that takes care of some of those needs, but in the performance aspect, being able to do those things on the file system level would be faster.



ext4‘s limits are still pretty impressive. The largest volume/partition you can make with ext4 is 1 exbibyte – the equivalent of roughly 1,152,921.5 terabytes. While the maximum file size is 16 tebibytes – or roughly 17.6 terabytes, which is much bigger than any hard drive a regular consumer can currently buy.

ext4 is known to bring speed improvements over ext3 by using multiple different techniques. Like most modern file systems, it is a journaling file system, which means that it keeps a “journal” of where files are located on the disk and of any other changes to the disk. Despite all of its features, it does not support transparent compression, transparent encryption, or data deduplication. Snapshots are technically supported, but that feature is experimental at best.



Btrfs, which can be pronounced as “Butter FS”, “Better FS”, or “B-Tree FS”, is a file system made completely from scratch. Btrfs exists because the developers wanted to expand the functionality of a file system to include pooling, snapshots, and checksums among other things.

While independent from ext4, it wants to build off the ideas present in ext4 which are great for consumers and businesses alike and incorporate those additional features which will benefit everyone (but specifically enterprises). For enterprises who use very large programs with very large databases, having a seemingly continuous file system across multiple hard drives would be very beneficial because it can make consolidation of data much easier. Data deduplication would reduce the amount of actual space data would occupy, and data mirroring would become easier with btrfs as well when there is a single, broad file system that needs to be mirrored.

Of course, you can still choose to create multiple partitions so that you don’t have to mirror everything. The maximum partition size of a btrfs file system is 16 exbibytes, and the maximum file size is also 16 exbibytes. Considering that btrfs will be able to span over multiple hard drives, it’s a good thing that it supports 16 times more drive space than ext4.



Sadly, the arrival date for btrfs isn’t quite known. Officially, the next-generation file system is still classified as unstable, but if you download the latest version of Ubuntu you can choose to install on a btrfs partition. It has been reported Fedora 18 will use btrfs as its default file system, as by the time of its release a file system checker for btrfs should exist.

When btrfs will actually be classified as stable is still a mystery, but don’t expect Ubuntu to use btrfs by default until it is indeed considered stable. There is still a good amount of work left for btrfs, as not all features are yet implemented and performance (in my experience) is a little sluggish when compared to ext4.