Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have been reading about BTRFS and ZFS for a while and while I do appreciate the benefits of CoW when hosting important files I am currently puzzled by the following dilemma:

Given that both ZFS and BTRFS seem to suffer performance degradation when hosting large files subject to random writes (e.g. QCOW2, VDIs, etc), why would someone use BTRFS as a FS of choice to host VMs?

I know that in the case o BTRFS you can selectively turn off CoW using chattr, or the nodatacow mount option, reducing the degradation imposed by fragmentation and CoW...

However, according to Redhat this also "disables checksum verification of data and metadata, resulting in reduced data integrity." (in addition to the lost compression and naturally the so desired CoW).

Based on that I ask: Why would someone chose BTRFS over lets say, XFS over LVM over MD RAID ?

share|improve this question

1 Answer 1

BTRFS has a different on disk format that will outperform other file systems on some write patterns. In particular a large amount of effort has been spent in improving how meta-data is written to disk and it supports some advanced features such as data checksumming, compression, and snapshots. For large files improving meta-data performance is generally not important.

Compared to ZFS, BTRFS is a simpler solution and better supported on Linux. The major downside is that it does not scale as well (when adding large number of disks) and does not have the same feature set.

Compared to XFS it will be a lower performance solution. I.e. it will take more processor time to write a chunk of data to disk and it will be limited in maximum throughput. This can be mitigated to some extent by doing things like disabling checksum verification, but then you lose the primary benefit of BTRFS over XFS which is improved meta-data information. I.e. checksumming and different journaling (which may be better in some situations).

In terms of Copy On Write (COW) support, XFS favors performance over being strictly COW. I.e. XFS has very good meta data and journaling features in terms of scalability and will generally not overwrite file data on write with the exception being that it will allow existing disk blocks to be over-written if the application specifically requests to over-write that data. This can be good in the case of a VM as your disk allocation initially can be contiguous and in that case would remain contiguous for the lifetime of the VM.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.