KVM - The Linux Kernel-Based Virtual Machine
News, Blogs and Resources on the Linux (KVM) Kernel-Based Virtual Machine

KVM & virtio disk performance problem

2 replies [Last post]
fb2k
Offline
Joined: May 6 2010
Points: 3

hi all,

I'm running a RHEL 5.4 host with a single virtualized RHEL 5.4 guest. The guest disk device is configured as follows:
    <disk type='block' device='disk'>
      <driver name='qemu' cache='none'/>
      <source dev='/dev/VolGroup00/IER'/>
      <target dev='vda' bus='virtio'/>
    </disk>

When the guest is under heavy I/O load, I get an %iowait reading from iostat around 50% on the guest, but on the host %iowait is merely 12% ! That's an enormous overhead, so I'm wondering if I am doing anything wrong, or if this kind of performance hit is the price for virtualization :(

thanks in advance for any suggestions,

fb2k

MossySf (not verified)
Your config says to turn off

Your config says to turn off disk caching by the host. That means your guest is doing a lot of "waiting" for disk operations to finish. Sounds like tweaks inside the guest is the right direction but which way to go is unknown without more details on the disk subsystem and the nature of the I/O transactions.

thefox (not verified)
number of CPUs

Did your host have 8 CPU cores and did you assign only 2 of them to the guest? In that case when one process is waiting for I/O and the CPU has nothing better to do, one CPU core worth of CPU time is in iowait state. 50% is 1/2 and 12,5% is 1/8 and from these numbers I'm guessing that this is the case. I might be of course completely wrong.

Also, don't worry about iowait too much. The processor is in this state only when it has nothing else to do. If you ran one I/O intensive task on 2-core machine, the CPU usage would be 50 % iowait and 50 % idle. If you ran one I/O intensive task and two CPU intensive tasks, CPU usage would be 100 % user. That means that if CPU is busy, there can be much "hidden" I/O activity going on.

Post new comment

The content of this field is kept private and will not be shown publicly.
Type the characters you see in this picture. (verify using audio)
Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.