Lvm – Why is zfs/btrfs recommended for an lxd host

btrfslvmlxcperformancezfs

Note that for maximum performance, it's recommended to have
/var/lib/lxd on a btrfs filesystem or setup ZFS or LVM and configure
LXD to use a ZFS pool or LVM VG.
Source

Why is that? I.e. How will those file systems (on the host) equate to better container performance?

Is it computational performance, is it just reduced hard drive consumption because of copy-on-write, both, neither, or something else?

Edit 1

Thanks to @Sven for pointing out that "LVM VG" refers to Logical Volume Manager Volume Group.

Best Answer

In addition to what @Sven said; ZFS, btrfs and LVM all provide copy-on-write clone/snapshot features. This makes it very cheap storage and time-wise to spin up new containers. With an image stored on regular ext2-4 filesystem, LXD will have to copy all the data itself, which takes more time and storage.

Related Topic