
Russell Coker via luv-talk wrote:
On Monday, 23 December 2019 4:08:03 PM AEDT Brian May via luv-talk wrote:
My understanding is that COW file-systems such as ZFS or BTRFS are horrible for VMs, and recommended practise is to turn off COW.
COW within COW is bad, so don't use BTRFS for the filesystem inside a VM and for the VM data store. Running Ext4 in a VM and BTRFS or ZFS for the VM store works well enough as long as your disk access isn't too intensive.
Boring additional comments: For btrfs you can set "nodatacow" option on my-disk-image.raw, which has... implications. ZFS doesn't have this, because why would you even. Cool kids might use a zfs dataset (directory tree) instead of a zvol dataset (block device), then export to the guest using virtio-fs [0] or older and much slower 9p [1]. The former requires Linux 5.4+ (or patches), and apparently isn't in BSD yet. PS: the linux page cache is still Fucking Awful because Linux wants to keep supporting embedded systems (which can't afford the RAM flagfall for a modern ARC): https://linux-mm.org/AdvancedPageReplacement https://github.com/Feh/nocache [0] https://virtio-fs.gitlab.io/ https://lwn.net/Articles/788333 [1] https://www.linux-kvm.org/page/VirtFS