From mboxrd@z Thu Jan 1 00:00:00 1970 From: Erik Brakkee Subject: Workload spikes on KVM host when doing IO on a guest... Date: Sun, 20 May 2012 02:55:48 +0200 Message-ID: <4FB84114.1090600@brakkee.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit To: kvm@vger.kernel.org Return-path: Received: from smtp-vbr10.xs4all.nl ([194.109.24.30]:4203 "EHLO smtp-vbr10.xs4all.nl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751109Ab2ETBFB (ORCPT ); Sat, 19 May 2012 21:05:01 -0400 Received: from brakkee.org (a83-163-128-75.adsl.xs4all.nl [83.163.128.75]) by smtp-vbr10.xs4all.nl (8.13.8/8.13.8) with SMTP id q4K0tqOh019749 for ; Sun, 20 May 2012 02:55:53 +0200 (CEST) (envelope-from erik@brakkee.org) Received: from pelican.lan (unknown [192.168.178.30]) by brakkee.org (Postfix) with ESMTP id 745CF6F638 for ; Sun, 20 May 2012 02:55:48 +0200 (CEST) Sender: kvm-owner@vger.kernel.org List-ID: 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. 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. 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). 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. When I look at the output of 'virsh dumpxm ' I get this as part of the output which indicates that cache="none" is actually used
The host is an opensuse 11.3 system (Linux falcon 2.6.34.10-0.6-default #1 SMP 2011-12-13 18:27:38 +0100 x86_64 x86_64 x86_64 GNU/Linux). The kvm version is falcon:~ # rpm -qa | grep kvm kvm-0.12.5-1.8.1.x86_64 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? Cheers Erik