public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcelo Tosatti <mtosatti@redhat.com>
To: Gerd von Egidy <lists@egidy.de>
Cc: kvm-devel@lists.sourceforge.net
Subject: Re: disappointing speed with virtio_blk
Date: Sun, 13 Apr 2008 21:29:02 -0300	[thread overview]
Message-ID: <20080414002902.GA4546@dmt> (raw)
In-Reply-To: <200804132304.44950.lists@egidy.de>

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

  parent reply	other threads:[~2008-04-14  0:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-13 21:04 disappointing speed with virtio_blk Gerd von Egidy
2008-04-13 21:22 ` Charles Duffy
2008-04-13 21:55   ` Gerd von Egidy
2008-04-14  0:29 ` Marcelo Tosatti [this message]
2008-04-16 23:05   ` Gerd von Egidy
2008-04-16 23:40     ` Marcelo Tosatti
2008-04-18 21:27       ` Gerd von Egidy
2008-04-18 21:49         ` Marcelo Tosatti
2008-04-18 22:32           ` Gerd von Egidy
2008-04-14  1:41 ` Anthony Liguori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080414002902.GA4546@dmt \
    --to=mtosatti@redhat.com \
    --cc=kvm-devel@lists.sourceforge.net \
    --cc=lists@egidy.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox