qemu save image in compressed format takes forever
Software environment
- Operating system: Arch Linux up to date
- Architecture: amd64
- kernel version: 6.7.1
- libvirt version: 10.0.0
- Hypervisor and version: libvirt 10.0.0 / qemu 8.2.0
Description of problem
When I edit /etc/libvirt/qemu.conf to use xz or other compression algorithm to have smaller sized qemu saved images, it takes forever to make a save. Actually I was not patient enough to wait for it to finish even with a 8gb memory VM. RAW works and saves in a few seconds on my NVME. My guess is there's a bottleneck when the compression is run. My processor is AMD Ryzen 7 PRO 5850U with 8 cores/16 threads, it shall not take so much time to compress.
Steps to reproduce
- change qemu.conf save_image_format = "raw" to save_image_format = "xz" or gzip
- restart libvirt
- save a running domain and observe slowness