Jun 3, 2012
tom

KVM slow guest i/o

Question

Host:

Debian 6.0 (squeeze) with qemu-kvm and libvirt from squeeze-backports

ii qemu-kvm 1.0+dfsg-8~bpo60+1

ii libvirt-bin 0.9.8-2~bpo60+2

Has 3TB sata drives with software raid and lvm. It has a sequential write speed of ~140MB/s measured with dd bs=1M count=512 if=/dev/zero of=test conv=fdatasync

Elevator set to cfq

Guest

Debian 6.0 (squeeze)

Uses LVM as storage. Drivers are virtio and cache=’none’

Sequential write speed is considerably slower with only 25-50MB/s

Elevator set to noop

I’m kind of running out of ideas for further tweaks but I’m sure that I/O speed should be much faster because many people are reporting almost native performance with lvm.

Asked by Akarot

Answer

Ok, this has been finally solved. The problem was in partition misalignment. It looks like Debian’s default installer (especially lenny?) can’t do the alignment properly, because when I checked the partitions it made with parted, it reported misalignment on all of them.

I solved this by manually partitioning LVM with parted prior to installation and now all guests are enjoying full performance.

Answered by Akarot

Related posts:

  1. KVM Guest Shows High CPU Usage in Host but not in Guest
  2. cloning a kvm guest os to a vmdk file
  3. NAT KVM Guest and Route All Guest Traffic to Host VPNC Connection
  4. How do I migrate a KVM guest from host to another?
  5. Guest Access in QEMU-KVM

Leave a comment