Filesystem Comparison: Ext4 vs Xfs vs Zfs vs Btrfs

ยท ยท 279 words ยท 2 minute read

Linux is known of giving us choices. You can choose your distro, desktop environment, .. and filesystem. Your choice of filesystem will impact performance, reliability, efficiency and security. So you need to know your fs options and alternatives.

According to wikipedia, filesystem (fs) controls how data is stored and retrieved.

Ext4 ๐Ÿ”—

  • the defacto standard for desktop Linux distributions.
  • journaling file system, so it is less likely to be corrupted by a crash or eletricity short.
  • 32 bit fs
  • maximum file size : 16 TB
  • maximum volume size : 1 EB
  • delayed allocation which helps in making a better allocation choices and less fragmentation. That’s great for performance.
  • online defragmentation : you can use e4defrag tool.

Xfs ๐Ÿ”—

  • ideal for large data
  • high disk IO performance
  • large number of CPUs and disks
  • journaling file system
  • 64 bit fs
  • max file system size : 16 EB (16 EiB)
  • max file size : 8 EiB
  • online defragmentation using xfs_fsr tool.
  • online resizing using xfs_rowfs tool.

Zfs ๐Ÿ”—

  • file system and volume manager
  • 128 bit fs
  • max file size : 16 EiB
  • max volume size : 256 trillion YiB
  • disk layout : storage pool (SPA)
  • transactional semantics : copy on write
  • checksum for data consistency
  • single fs snapshot
  • RAID-Z
  • built-in scrub : repair silent corruption.

Btrfs ๐Ÿ”—

  • copy on write
  • data structure : b tree (binary tree)
  • storage pool
  • 64 bit fs
  • max file size : 16 EiB
  • single volume snapshot
  • transparent file compression
  • built-in RAID support
  • SSD aware fs : automatically detects SSD, turn off all optimizations for rotational media, TRIM support (optimization for SSD).
  • online defragmentation
  • ext fs to btrfs using btrfs-convert tool.

Watch this video to know more :

Share: