From: Henrik Holst Subject: Re: qcow2 slowdown in kvm-78,79 Date: Thu, 20 Nov 2008 08:57:40 +0100 Message-ID: <1227167860.6473.13.camel@henrik-desktop> References: <1227019192.22098.4.camel@henrik-desktop> <20081119182317.GA31893@us.ibm.com> <49245A61.9050504@codemonkey.ws> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: Ryan Harper , kvm@vger.kernel.org To: Anthony Liguori Return-path: Received: from ik-out-1112.google.com ([66.249.90.176]:29121 "EHLO ik-out-1112.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753604AbYKTH5r (ORCPT ); Thu, 20 Nov 2008 02:57:47 -0500 Received: by ik-out-1112.google.com with SMTP id c29so278216ika.5 for ; Wed, 19 Nov 2008 23:57:45 -0800 (PST) In-Reply-To: <49245A61.9050504@codemonkey.ws> Sender: kvm-owner@vger.kernel.org List-ID: ons 2008-11-19 klockan 12:26 -0600 skrev Anthony Liguori: > Ryan Harper wrote: > > * Henrik Holst [2008-11-18 08:42]: > > > >> The bundled qemu in kvm-78 and kvm-79 slows down disk i/o with qcow2 > >> images by an order of 10. If one got 60MB/s before, one gets around > >> 6MB/s with 78 and 79 (measured with dd) > >> > > > > dd command? dd if=/dev/zero of=/mnt/zero count=102400000 & and then "kill -USR1 " to get the statistics > > > > what's your -drive parameters look like, specifically, what if type? > > ide, scsi, virtio? It is the same regardless of ide,scsi or virtio. Virtio starts quite high around 70MB/s but quickly goes down to 6MB/s (after roughly 10 seconds). The command line (for virtio) is: qemu-system-x86_64 -M pc -m 771 -smp 1 -vnc :0,tls,x509verify=/opt/kvm/cert \ -k en-us -monitor pty -serial none -usbdevice tablet \ -drive file=/mnt/d0/drive.root,if=virtio,media=disk,boot=on \ -drive file=/mnt/d0/drive2,if=virtio,media=disk,boot=off \ -net nic,macaddr=DE:AF:00:00:10:43,model=virtio \ -net tap,script=/opt/kvm/share/qemu-ifup \ -uuid 6b7d5438-1309-4cf0-ae08-57234d61d473 I have tested with all kinds of -m settings as well (up to 8GiB) without any change. > > > > This is probably the change to cache=writethrough. I bet if you set > cache=writeback then you'll see this go away. cache=writeback is only slightly faster, like going from 6MB/s to 7MB/s. The only thing that works is using qemu userland from kvm-77. I have not tested this with anything other than qcow2 so I'm guessing that it is related to qcow2 due to the cache change in kvm-78 and your other comments about qcow2 and these changes when issues about degraded qcow2 performance has come up. /Henrik Holst https://witsbits.com