kvm low io performance
Solution 1:
The optimal configuration is (usually) as follows:
- On the host, set
elevator=deadline
- Use virtio and only virtio
- use raw LVs whenever possible. Qcow2 gives overhead. Files on a FS also have overhead
- in the VM use the
elevator=noop
- both in host and VM, use
noatime,nodiratime
in fstab wherever possible - Make sure the virtio drivers are up to date, especially the windows ones.
- Debian based distros are (arguably) not as good as Fedora and RHEL for QEMU/KVM. Not to start a flamewar, but most of the development and testing is done on Fedora and RHEL, and in my own experience, there have been lots of issues on Ubuntu and Debian that I couldn't reproduce on Fedora and RHEL. You can ignore this particular bullet if you want, but if you're looking for a solution, a quick benchmark on another distro is usually worth a try
Solution 2:
Try setting "deadline" as the I/O scheduler for your host's disks before starting KVM:
for f in /sys/block/sd*/queue/scheduler; do echo "deadline" > $f; done
If you have I/O bound load, it might be your best choice as this IBM paper suggests.