Btrfs
A modern copy-on-write filesystem natively supported by the Linux kernel. It supports snapshots, subvolumes, transparent compression, and multi-device management, and has been adopted as the default filesystem by several mainstream Linux distributions.
Timeline (last 90 days)
PostgreSQL's MVCC mechanism, ZFS/Btrfs filesystem snapshots, and some cloud database services use copy-on-write or similar storage tiering technology as their underlying foundation.
Btrfs has been merged into the Linux kernel mainline for many years, requires no additional modules, and supports copy-on-write, snapshots, subvolumes, and transparent compression.
Distributions such as openSUSE and Fedora have adopted Btrfs as their default filesystem.
Copy-on-write filesystems introduce write amplification for workloads with frequent random writes, such as databases, and both ZFS and Btrfs require targeted tuning.
On Btrfs, CoW can be disabled for database files using chattr +C; on ZFS, reducing the recordsize to align with the database page size (e.g., the 8KB commonly used by PostgreSQL) can mitigate write amplification.
Filesystem selection recommendations: choose ZFS for extremely high data integrity requirements where additional overhead is acceptable, choose Btrfs for out-of-the-box use and kernel integration, and follow bcachefs for those willing to bet on cutting-edge design and accept the associated risks.
Bartosz Fenski published an article comparing the performance of Btrfs, ZFS, and bcachefs under real-world workloads.
The copy-on-write (CoW) mechanism is inherently more prone to fragmentation than in-place update strategies, because each modification scatters data blocks to new locations.
The Btrfs documentation recommends using the nodatacow attribute on database files and virtual machine images to disable CoW and reduce fragmentation.
Btrfs provides the built-in defragmentation command btrfs filesystem defragment, and XFS provides the xfs_fsr tool for online defragmentation.
1 more timeline events
All Facts (10)
PostgreSQL's MVCC mechanism, ZFS/Btrfs filesystem snapshots, and some cloud database services use copy-on-write or similar storage tiering technology as their underlying foundation.
50%UnverifiedDistributions such as openSUSE and Fedora have adopted Btrfs as their default filesystem.
50%UnverifiedBtrfs has been merged into the Linux kernel mainline for many years, requires no additional modules, and supports copy-on-write, snapshots, subvolumes, and transparent compression.
50%UnverifiedCopy-on-write filesystems introduce write amplification for workloads with frequent random writes, such as databases, and both ZFS and Btrfs require targeted tuning.
50%UnverifiedOn Btrfs, CoW can be disabled for database files using chattr +C; on ZFS, reducing the recordsize to align with the database page size (e.g., the 8KB commonly used by PostgreSQL) can mitigate write amplification.
50%UnverifiedFilesystem selection recommendations: choose ZFS for extremely high data integrity requirements where additional overhead is acceptable, choose Btrfs for out-of-the-box use and kernel integration, and follow bcachefs for those willing to bet on cutting-edge design and accept the associated risks.
50%UnverifiedThe copy-on-write (CoW) mechanism is inherently more prone to fragmentation than in-place update strategies, because each modification scatters data blocks to new locations.
50%UnverifiedThe Btrfs documentation recommends using the nodatacow attribute on database files and virtual machine images to disable CoW and reduce fragmentation.
50%UnverifiedBtrfs provides the built-in defragmentation command btrfs filesystem defragment, and XFS provides the xfs_fsr tool for online defragmentation.
50%UnverifiedBtrfs uses a copy-on-write (CoW) mechanism that writes data to a new location rather than overwriting the original upon modification, which naturally produces more fragmentation than in-place update strategies.
50%