On 05/20/2012 03:55 AM, Erik Brakkee wrote: > Hi, > > > I am seeing high workload spikes of approx. 15 when I do IO inside a > KVM guest, for instance > > dd if=/dev/zero bs=1G count=1 of=hog > > When I execute a similar command on the host to write a file on the > same physical disk, the workload only goes to about 3. This is not surprising. Each I/O request executes in a thread. > > I am using virtio on the guest with cache mode none. Also, I am using > the noop IO scheduler on the guest and the deadline IO scheduler on > the host. > The guest is allocated a logical volume from the host. > With logical volumes, you can use -drive ...,aio=native to avoid the threads. The load will disappear. > When I execute the dd command on the guest, it finishes almost > instantaneously but when I execute it on the host I have to wait for > approx 10 seconds. Specifically, > on the guest I see a transfer speed of approx. 600 MB/s and on the > host I get 75.9MB/s. The figure for the host is most reliable as this > is close to what the hard disks can handle (WD enterprise class SATA > hard disks). try dd oflag=direct to force the data to disk. No idea why the host doesn't finish instantaneously. > > What appears to be happening is that somehow it forwards all IO from > the guest immediately to the host, just as if write back caching was > used. Write back caching is indeed used, since you did not specify oflag=direct. > Is this some known issue in this version of KVM and should I simply > upgrade (or replace the host with a centos 6.2 system). Or is there a > simple configuration that can fix this? Nothing is broken, so it doesn't need fixing. The high load is not an indication of anything. -- error compiling committee.c: too many arguments to function -- 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