Re: Recommendation: laptop with SATA HDD, NVMe SSD; compression; fragmentation
From: Matthew Warren <hidden>
Date: 2021-12-21 22:56:55
Does Btrfs unsuitability to QEMU VM images relate exclusively to synchronous write *performance*, or does it also harm SSD lifetime (assuming nodatacow and raw format)? I intend to give my VM a second disk image. One image will be on the SSD (holding system files) and the other on the SATA HDD (holding user files). The NVMe SSD is probably fast enough that the VM will have overall good performance even with the synchronous write slowness you mentioned; but would it excessively wear the SSD? Do I have to create an ext4 partition on the SSD just for the QEMU VM disk image?
I was running with VM images on an SSD formatted with btrfs with COW and didn't see much in the way of performance issues, but they weren't disk-heavy VMs in the first place. I did have an issue with fragmentation though, so I'd recommend storing them on a separate partition formatted as either xfs or ext4. Matthew Warren On Mon, Dec 20, 2021 at 7:48 AM Jorge Peixoto de Morais Neto [off-list ref] wrote:
Hello, On Mon, 2021-12-20 at 13:29 +0300, Vadim Akimov wrote:quoted
From my limited experience, it would be better installing at some (extra) HDD in "normal" mode and then copying everything to newly formatted btrfs volume with all options as you like. After that, you do usual 'chroot, grub-install' thing et voila.Is that experience from before Bullseye? I heard that the Bullseye installer has better Btrfs support.quoted
Also from my experience, it's better not to use btrfs for qemu images at all. [...] Even with such file you'll get synchronous writes in the VM 3-4 times slower than you'd have with image on ext4.Does Btrfs unsuitability to QEMU VM images relate exclusively to synchronous write *performance*, or does it also harm SSD lifetime (assuming nodatacow and raw format)? I intend to give my VM a second disk image. One image will be on the SSD (holding system files) and the other on the SATA HDD (holding user files). The NVMe SSD is probably fast enough that the VM will have overall good performance even with the synchronous write slowness you mentioned; but would it excessively wear the SSD? Do I have to create an ext4 partition on the SSD just for the QEMU VM disk image?quoted
you still can have swap in a file over btrfs, no need for separate partition.I am aware Btrfs has official support for swap files (with some restrictions), but is it reliable, efficient and light on the SSD lifetime? The Debian wiki recommends against swap file on Btrfs (although some parts of Debian wiki are visibly outdated). Thank you for your help! Kindest regards, Jorge