From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kurt Yoder Subject: Re: IO on guest is 20 times slower than host Date: Wed, 25 Mar 2009 12:51:43 -0400 Message-ID: References: <49CA5825.7030201@redhat.com> <4AC00930-1EBB-4704-94CF-29478D07F03A@yoderhome.com> <49CA5D53.1080401@redhat.com> Mime-Version: 1.0 (Apple Message framework v930.3) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Avi Kivity Return-path: Received: from vms173003pub.verizon.net ([206.46.173.3]:43580 "EHLO vms173003pub.verizon.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752874AbZCYQvs (ORCPT ); Wed, 25 Mar 2009 12:51:48 -0400 Received: from yoderhome.com ([173.66.244.241]) by vms173003.mailsrvcs.net (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPA id <0KH2001K6MU7LSSY@vms173003.mailsrvcs.net> for kvm@vger.kernel.org; Wed, 25 Mar 2009 11:51:44 -0500 (CDT) In-reply-to: <49CA5D53.1080401@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Mar 25, 2009, at 12:35 PM, Avi Kivity wrote: > Kurt Yoder wrote: >>> >>> I get 141 MB/s on the same test (it only copies to memory >>> anyway). Is your VM under memory pressure? >> >> I don't think so. The host has 128 GB of memory, and even the pre- >> emptive kernel caching doesn't come close to filling it: >> >> me@host:~$ free >> total used free shared buffers >> cached >> Mem: 132043960 1742480 130301480 0 84628 >> 826040 >> -/+ buffers/cache: 831812 131212148 >> Swap: 1048568 0 1048568 >> >> My /tmp should be physical disk in both cases. To be thorough, I >> also ran the test while writing the output file to /, and got the >> same results (5.7 MB/s on guest, 144 MB/s on host). > > Your guest is only assigned 256MB though. I upped the memory on the VM to 1 GB and ran the same test. It actually got *slower*: me@guest:~$ free total used free shared buffers cached Mem: 1024224 131324 892900 0 1816 18328 -/+ buffers/cache: 111180 913044 Swap: 488248 0 488248 me@guest:~$ sudo -s me@guest:~# dd if=/dev/zero of=/bigfile count=100000 100000+0 records in 100000+0 records out 51200000 bytes (51 MB) copied, 22.2141 s, 2.3 MB/s I ran this three times to make sure it wasn't a fluke, and got those same rates each time. The guest is now running thus: root 19915 1 0 Mar24 ? 00:00:00 /usr/sbin/libvirtd -d nobody 19937 19915 0 Mar24 ? 00:00:00 dnsmasq --keep-in- foreground --strict-order --bind-interfaces --pid-file --conf-file -- listen-address 192.168.122.1 --except-interface lo --dhcp-leasefile=/ var/lib/libvirt/dhcp-default.leases --dhcp-range 192.168.122.2,192.168.122.254 root 25051 19915 54 12:40 ? 00:05:05 /usr/bin/kvm -S -M pc -m 1024 -smp 1 -name guest -monitor pty -boot c -drive file=/dev/ HW_RAID/Guest,if=virtio,index=0,boot=on -net nic,macaddr=52:54:00:ba:e6:db,vlan=0,model=virtio -net tap,fd=11,script=,vlan=0,ifname=vnet1 -serial none -parallel none -usb -vnc 127.0.0.1:1