Hacker News new | ask | show | jobs
by the8472 1832 days ago
btrfs does have some advantages over zfs

   - no data duplicated between page cache and arc
   - no upgrade problems on rolling distros
   - balance allows restructuring the array
   - offline dedup, no need for huge dedup tables
   - ability to turn off checksumming for specific files
   - O_DIRECT support
   - reflink copy
   - fiemap
   - easy to resize
5 comments

>- ability to turn off checksumming for specific files

This is something that has always confused me. BTRFS users are always advised to disable copy-on-write (thus preventing checksumming or compression) for VM images or database files to avoid massive performance hits from fragmentation. Even Facebook still stores its databases mostly on XFS filesystems. However, the ZFS community seems to indicate that you can achieve reasonable performance for databases and VMs just by tuning the recordsize (e.g. https://pg.uptrace.dev/zfs/). How does ZFS mitigate the problems from fragmentation?

But the main thing of an fs is to preserve your files...btrfs can't even check the most important point.
The checksumming helps to spot faulty hardware, that's a step above most other filesystems and often smart info too.
Checksums don't help against bugs. You are much less likely to lose your whole disk with ext4 or ZFS than BTRFS.
I see this a lot but have never had problems with BTRFS and I’ve used it both on my larger disks (2+tb) and my root (250gb ssd) across multiple computers for the last four years.
And even included in the kernel

    - defragmentation
Some of these are fair points but zfsonlinux/OpenZFS has had O_DIRECT since 0.8.x.
ZFSOnLinux just ignores the O_DIRECT flag if I remember correctly. Granted, this is what btrfs should do by default as well since there is an ugly issue where software can modify the O_DIRECT buffer after it was submitted causing btrfs checksum errors even though nothing was corrupted (and there is nothing to be done about it except disabling O_DIRECT or creating a buffer copy).
Yes (and as you mention this is the right thing to do) but I think it means that the Linux kernel will bypass the page cache which is still useful.