Slow disk IO on virtio kvm guests with Centos 5.5 as hypervisor

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I've set up a KVM hypervisor for testing purposes. It's running on an AMD Quad-Core Phenom with a local RAID5 which is made of three disks connected to a hardware RAID controller. On top of this, there an LVM volume.

dd'ing /dev/zero to a testfile gives me a throughput of about 400MB/s when done directly on the hypervisor. If I try this from within a virtual guest, it's only 19MB/s to 24MB/s if the guest is on the LVM volume (raw device, not qcow2 or something, no filesystem on top of the LVM).

Even if I place the guest on an iSCSI target on my desktop PC (which has one cheap SATA drive only), I get a write throughput of about 50MB/s to 60MB/s from within the virtual machine. What could be the reason for the slow disk IO if the guests are stored locally on the hypervisor?


The setup is as follows:

1. Package versions:

kvm-qemu-img-83-164.el5_5.25
kmod-kvm-83-164.el5_5.25
kvm-83-164.el5_5.25
libvirt-0.6.3-33.el5_5.3

2. Hypervisor kernel version: 2.6.18-194.32.1.el5

3. kvm_amd is loaded on the hypervisor, and the virtio stuff is loaded on the guest:

virtio_net             47425  0
virtio_balloon         39877  0
virtio_blk             41417  3
virtio_pci             41417  0
virtio_ring            37441  1 virtio_pci
virtio 39365 4 virtio_net,virtio_balloon,virtio_blk,virtio_pci

4. Guest has been installed as follows:

virt-install --name spacewalk --vcpus 4 -r 2048 -u `uuidgen` --os-type linux --os-variant virtio26 -b kvmbr0 -v --accelerate -c /root/CentOS-5.5-x86_64-netinstall.iso --disk path=/dev/vg0/lvspace,bus=virtio,sparse=false

5. Guest XML dump:

<domain type='kvm' id='11'>
 <name>spacewalk</name>
 <uuid>a6e2b1f7-d3eb-4e91-a1db-4e248a395b25</uuid>
 <memory>2097152</memory>
 <currentMemory>2097152</currentMemory>
 <vcpu>4</vcpu>
 <os>
   <type arch='x86_64' machine='rhel5.4.0'>hvm</type>
   <boot dev='cdrom'/>
 </os>
 <features>
   <acpi/>
   <apic/>
   <pae/>
 </features>
 <clock offset='utc'/>
 <on_poweroff>destroy</on_poweroff>
 <on_reboot>restart</on_reboot>
 <on_crash>restart</on_crash>
 <devices>
   <emulator>/usr/libexec/qemu-kvm</emulator>
   <disk type='block' device='disk'>
     <driver name='qemu' cache='none'/>
     <source dev='/dev/vg0/lvspace'/>
     <target dev='vda' bus='virtio'/>
   </disk>
   <disk type='file' device='cdrom'>
     <source file='/root/CentOS-5.5-x86_64-netinstall.iso'/>
     <target dev='hdc' bus='ide'/>
     <readonly/>
   </disk>
   <interface type='bridge'>
     <mac address='54:52:00:13:cf:58'/>
     <source bridge='kvmbr0'/>
     <target dev='vnet0'/>
     <model type='virtio'/>
   </interface>
   <serial type='pty'>
     <source path='/dev/pts/2'/>
     <target port='0'/>
   </serial>
   <console type='pty' tty='/dev/pts/2'>
     <source path='/dev/pts/2'/>
     <target port='0'/>
   </console>
   <input type='mouse' bus='ps2'/>
<graphics type='vnc' port='5900' autoport='yes' listen='0.0.0.0' keymap='de'/>
 </devices>
</domain>


Thanks in advance,

--
Thomas

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux