Filesystems – Advantages of Btrfs for End Users

btrfsfilesystems

Btrfs has begun to gain some momentum in replacing ext4 as the default filesystem of choice for a few distributions such as Fedora Core 16. It is experimentally available in a number of other distributions (From Wikipedia: openSUSE 11.3, SLES 11 SP1, Ubuntu 10.10, Sabayon Linux, RHEL6,MeeGo, Debian 6.0, and Slackware 13.37). I'm certainly not ready to convert all my workplace servers over (my file system choice is generally conservative), I'm considering using it at home and on select non-mission critical production machines at work.

Btrfs brings a feature set that is similar to ZFS in many ways. I can understand why this would be desirable in an "enterprise" environment, especially with systems that focus on storage delivery. But how is this same feature set useful for end users? What advantages does Btrfs' feature list give me on machines whose primary function is not the presentation of storage? What advantages does it give me on my laptop?

Outside of enterprise storage, why should I bother switching to Btrfs from the tried and true Ext filesystem?

Best Answer

From wiki:

Extent based file storage
2^64 byte == 16 EiB maximum file size
Space-efficient packing of small files
Space-efficient indexed directories
Dynamic inode allocation
Writable snapshots, read-only snapshots
Subvolumes (separate internal filesystem roots)
Checksums on data and metadata
Compression (gzip and LZO)
Integrated multiple device support 
    RAID-0, RAID-1 and RAID-10 implementations 
Efficient incremental backup
Background scrub process for finding and fixing errors on files with redundant copies
Online filesystem defragmentation 

Explanation for desktop users:

  • Space-efficient packing of small files: Important for desktops with tens of thousands of files (maildirs, repos with code, etc).
  • Dynamic inode allocation: Avoid the limits of Ext2/3/4 in numbers of inodes. Btrfs inode limits is in a whole different league (whereas ext4's inodes are allocated at filesystem creation time and cannot be resized after creation, typically at 1-2 million, with a hard limit of 4 billion, btrfs's inodes are dynamically allocated as needed, and the hard limit is 2^64, around 18.4 quintillion, which is around 4.6 billion times the hard limit of ext4).
  • Read-only snapshots: fast backups.
  • Checksums on data and metadata: essential for data integrity. Ext4 only has metadata integrity.
  • Compression: LZO compression is very fast.
  • Background scrub process to find and to fix errors on files with redundant copies: data integrity.
  • Online filesystem defragmentation: autodefrag in 3.0 will defrag some types of files like databases (e.g. firefox profiles or akonadi storage).

I recommend you the kernel 3.0. Also btrfs is a good FS for SSD.

Related Question