3 ms·
Running VMs (and database servers) on btrfs performs really bad so you have to disable CoW for them. Otherwise you'll get situations where your 100GB VM image
by ChocolateGod 2y ago
Running VMs (and database servers) on btrfs performs really bad so you have to disable CoW for them.
Otherwise you'll get situations where your 100GB VM image will use over a TB of physical disk space.
It's a shame really that this still isn't solved.
- Joe_Cool 2y agoI don't think thin provisioning btrfs makes a lot of sense. Before disabling CoW I'd rather use a different filesystem. Are you sure your TRIM is working and the VM disk image is compacting properly? It's working for me but not really great for fragmentation.
- ComputerGuru 2y agoWhat’s the underlying issue? I used VMs with ZFS for storage for well over a decade with no issue.
- dmm 2y agoZFS performs much better than btrfs with the many small writes that VMs produce. Why exactly is a great question. Maybe it has to do with the optimizations around the ZIL, the temporary area where sync writes are accumulated before they are written to the long-term spot.
- jeroenhd 2y agoCoW won't necessarily make the VM image bloated. In fact, as I've foolishly found out, BTRFS can be quite useful for deduplicating very similar VMs at the block level, at the cost of needing to re-allocate new disk space on writes. In my VM archive, six 50 GiB virtual machines took up 52 GiB rather than 300 GiB and that was quite impressive. Many downsides to CoW are also present with many common alternatives (i.e. thin LVM2 snapshots). Best to leave all of that off if you're using spinning rust or native compression features, though.