by aruggirello · 12y ago · 0 comments
The only case where I suspect btrfs might significantly outperform ZFS involves getdents() when the caches is cold. This is because ZoL does not presently do readahead on directory lookups. This has a noticeable impact on the performance of `ls` on the first access of a directory on mechanical storage, but it is not a problem for subsequent reads or on solid state storage. Prefetch support in getdents() will likely be implemented in either the next release or the one that follows.
This is especially important because on use cases where performance differences are significant, that is, not on general desktop usage, the maturity of the FS is funamental, and btrfs is discouraged right now.
https://github.com/ClusterHQ/flocker/blob/zfs-on-coreos-tuto...
CoreOS uses btrfs as its rootfs. I imagine that the CoreOS developers managed to avoid issues like ENOSPC by virtue of not writing to their rootfs very much. I did not have that luxury since I compiled a Gentoo GNU userland on top of it during the course of development. I encountered numerous ENOSPC errors on btrfs when developing the ZFS port to CoreOS and even hit ENOSPC errors when trying to correct the btrfs ENOSPC errors with `btrfs balance /`. I would not consider btrfs ready for production use, but your mileage will vary.
$ df -h .
Filesystem Size Used Avail Use% Mounted on
/dev/dm-1 42G 41G 280M 100% /home
$ btrfs fi df .
Data, single: total=40.48GiB, used=40.21GiB
System, single: total=4.00MiB, used=12.00KiB
Metadata, single: total=1.01GiB, used=649.18MiB
$ uname -r
3.15.2-hardened
As you can see, I've been working with a pretty much full btrfs volume. It used to be TERRIBLE to deal with btrfs in such a situation, but I haven't had an ENOSPC issue in ages.2: http://www.phoronix.com/scan.php?page=article&item=linux_313...
Edit: Nevermind about the advertising, it's still intrusive, I'm just running adblock now.
As for Phoronix's ZFS benchmarks, the test hardware used drives that misreported themselves as having 512-byte sectors, which handicapped ZFS performance. Phoronix rejected all suggestions that it correct for this as end-users had been doing. Phoronix refused to meet half way by posting two results (one with proper configuration and one without), and also refused the suggestion that it to mention the existence of that problem in its test hardware. I eventually wrote code to identify drives known to misreport their sector sizes so that ZFS will automatically use the correct settings on them. That lead to the Phoronix August 2013 benchmarks showing a remarkable improvement in ZFS performance in FIO. It was so great that it sparked a discussion among the btrfs developers:
http://comments.gmane.org/gmane.comp.file-systems.btrfs/2754...
Later that month, I publicly criticized Phoronix for posting misleading benchmarks:
http://phoronix.com/forums/showthread.php?83731-ZFSOnLinux-0...
Phoronix has not posted ZFS benchmarks since that time.
https://blogs.oracle.com/brendan/entry/a_quarter_million_nfs...
More recent derivatives of OpenSolaris were reported to do 1.6 million IOPS last year:
http://www.high-availability.com/high-availability-zfs-partn...
Your mileage will vary, but ZFS has always had strong performance.
Here's a benchmark from 2013 with most results showing that it has worse performance on Linux than XFS and EXT4:
http://www.phoronix.com/scan.php?page=article&item=zfs_linux...
As with most things, this isn't a binary decision, but typically ZFS is a good (if not the best) solution for most storage arrays.