On Sun, Apr 13, 2008 at 11:04:44PM +0200, Gerd von Egidy wrote: > Hi, > > I just tried the virtio block device with the intent > to boost disk throughput for my vm. > > I ran bonnie++ -r 512 -s 2048 -u nobody -d /tmp: > > Version 1.03 ------Sequential Output------ --Sequential Input- > --Random- > -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- > --Seeks-- > Machine Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec > %CP > virtio_blk 2G 14274 42 20206 14 22363 37 31116 92 66731 81 140.8 > 13 > kvm-ide 2G 26065 83 26435 28 24146 33 26587 84 57991 18 91.5 > 2 > > The host is a Xeon 3040, 1G RAM (I know that that is a bit > few, it's just a test machine...), the vm gets 512MB of that. > The data is stored on two SATA disks, mirrored (RAID1) with > md, lvm running on top of that. > > Host and Client are running 2.6.25-0.200.rc8.git3.i686. This > is a kernel from Fedora-Rawhide with kvm manually enabled by me. > KVM version is 64. > > Especially writing seems to be slower using virtio, but > reading isn't that much faster. > > I thought virtio would improve io speed significantly because > of fewer steps needed to communicate betweeen host and client. > What might be the reason that I can't see a speed boost? > > - Wrong setup (The virtio-client boots from /dev/vda1, > so I think virtio is working) > - virtio_blk is not matured/tuned enough to give a real > speed boost > - I'm missing a patch that is not included into 2.6.26-rc8 > but can be found in kvm-git > - The output of bonnie++ is bogus because timing is not that > accurate within a kvm-client > > Any ideas welcome.
virtio-blk is doing synchronous IO which blocks the guest CPU. This is especially bad for write intensive loads where the guest will hang in the host write throttling logic. In the meantime please try the following patch: http://www.mail-archive.com/kvm-devel@lists.sourceforge.net/msg14732.html Some larger changes will take place to allow similar behaviour with an API for asynchronous vectored IO. ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel