I've a DOM0 packed with two 3TB hard drives configured as a software RAID1, also sporting 16GB of memory. The DOM0's Linux distro is a CentOS 6.3 and the hypervisor is a libvirt-managed KVM.
I'm experiencing performances degradations between the DOM0 and the DOMU, with DOMU write throughput around 40% of the DOM0's. I tested the performances using the following simple dd command:
dd bs=1M count=1024 oflag=direct if=/dev/zero of=testb conv=fdatasync
I configured the DEADLINE elevator for DOM0 and the NOOP one for DOMU, which in turn is a Debian Unstable:
Linux vm1 2.6.32-5-amd64 #1 SMP Sun Sep 23 10:07:46 UTC 2012 x86_64 GNU/Linux root@vm1:/home/paris# cat /etc/debian_version 6.0.6
As for DOMU configuration in libvirt, here is the XML fragment for one of the virtual drives which are actually plain raw fallocated files:
<disk type='file' device='disk'> <driver name='qemu' type='raw' cache='none' io='native'/> <source file='/mnt/vmstore2/disks/vm1/boot.img'/> <target dev='vda' bus='virtio'/> <alias name='virtio-disk0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </disk>
I also noticed that in the command line generated by libvirt, the "if" parameter of the -drive command line switch is set to "none" instead of "virtio":
-drive file=/mnt/vmstore2/disks/vm1/root.img,if=none,id=drive-virtio-disk2,format=raw,cache=none,aio=native -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x7,drive=drive-virtio-disk2,id=virtio-disk2
I don't know whether this performace degradation is normal, but I read that VIRTIO should be able to guarantee an almost identical throughput between DOM0 and DOMU.
Thank you for any help.