Linux – KVM/Libvirt/Btrfs Filesystem speed improvements

btrfslibvirtlinuxlvmraid

i wanted to install a windows terminal server on a kvm hypervisor.

On the host i am using btrfs, i have read that there are some speed problems if i use btrfs whit libvirt. I wanted to use the btrfs rootfs on the same 4 hdd software raid 10 as the storage whitout separate boot paritition.

Option 1:
Can i mix lvm whit btrfs and raid? All of them have raid implemented or maybee mdraid and separate lvm and brtfs?
where to put swap?

Option 2:
It is maybee possible make the guest image readonly and write the changes to RAM or somewhere else..??

Best Answer

I'm not sure what particular performance problems you might be referring to, however, the well known issue is that the COW feature in btrfs will negatively impact guest performance. The way to deal with this is to turn off COW, either for the filesystem as a whole by mounting with "nodatacow", or for just the disk image file by passing "nocow=on" to qemu-img when creating the disk image.

Related Topic