From: Avi Kivity <avi@redhat.com>
To: Badari Pulavarty <pbadari@us.ibm.com>
Cc: Chris Wright <chrisw@sous-sol.org>,
Christoph Hellwig <hch@infradead.org>,
kvm@vger.kernel.org
Subject: Re: [RFC] vhost-blk implementation
Date: Tue, 30 Mar 2010 15:43:06 +0300 [thread overview]
Message-ID: <4BB1F1DA.2060907@redhat.com> (raw)
In-Reply-To: <1269903085.7931.99.camel@badari-desktop>
On 03/30/2010 01:51 AM, Badari Pulavarty wrote:
>
>
>>> Your io wait time is twice as long and your throughput is about half.
>>> I think the qmeu block submission does an extra attempt at merging
>>> requests. Does blktrace tell you anything interesting?
>>>
>>>
> Yes. I see that in my testcase (2M writes) - QEMU is pickup 512K
> requests from the virtio ring and merging them back to 2M before
> submitting them.
>
> Unfortunately, I can't do that quite easily in vhost-blk. QEMU
> does re-creates iovecs for the merged IO. I have to come up with
> a scheme to do this :(
>
I don't think that either vhost-blk or virtio-blk should do this.
Merging increases latency, and in the case of streaming writes makes it
impossible for the guest to prepare new requests while earlier ones are
being serviced (in effect it reduces the queue depth to 1).
qcow2 does benefit from merging, but it should do so itself without
impacting raw.
>> It does. I suggest using fio O_DIRECT random access patterns to avoid
>> such issues.
>>
> Well, I am not trying to come up with a test case where vhost-blk
> performs better than virtio-blk. I am trying to understand where
> and why vhost-blk performnce worse than virtio-blk.
>
In this case qemu-virtio is making an incorrect tradeoff. The guest
could easily merge those requests itself. If you want larger writes,
tune the guest to issue them.
Another way to look at it: merging improved bandwidth but increased
latency, yet you are only measuring bandwidth. If you measured only
latency you'd find that vhost-blk is better.
--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
next prev parent reply other threads:[~2010-03-30 12:43 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-23 1:00 [RFC] vhost-blk implementation Badari Pulavarty
2010-03-23 1:16 ` Anthony Liguori
2010-03-23 1:45 ` Badari Pulavarty
2010-03-23 2:00 ` Anthony Liguori
2010-03-23 2:50 ` Badari Pulavarty
2010-03-23 10:05 ` Avi Kivity
2010-03-23 14:48 ` Badari Pulavarty
2010-03-23 10:03 ` Avi Kivity
2010-03-23 14:55 ` Badari Pulavarty
2010-03-23 16:53 ` Avi Kivity
2010-03-24 20:05 ` Christoph Hellwig
2010-03-25 6:29 ` Avi Kivity
2010-03-25 15:48 ` Christoph Hellwig
2010-03-25 15:51 ` Avi Kivity
2010-03-25 15:00 ` Asdo
2010-04-05 19:59 ` Christoph Hellwig
2010-04-07 0:36 ` [RFC] vhost-blk implementation (v2) Badari Pulavarty
2010-03-23 10:09 ` [RFC] vhost-blk implementation Eran Rom
2010-03-24 20:04 ` Christoph Hellwig
2010-03-24 20:22 ` Badari Pulavarty
2010-03-25 7:57 ` Avi Kivity
2010-03-25 14:36 ` Badari Pulavarty
2010-03-25 15:57 ` Christoph Hellwig
2010-03-26 18:53 ` Eran Rom
2010-04-08 16:17 ` Stefan Hajnoczi
2010-04-05 19:23 ` Christoph Hellwig
2010-04-05 23:17 ` Badari Pulavarty
2010-03-24 20:27 ` Badari Pulavarty
2010-03-29 15:41 ` Badari Pulavarty
2010-03-29 18:20 ` Chris Wright
2010-03-29 20:37 ` Avi Kivity
2010-03-29 22:51 ` Badari Pulavarty
2010-03-29 23:56 ` Chris Wright
2010-03-30 12:43 ` Avi Kivity [this message]
2010-04-05 14:22 ` Stefan Hajnoczi
2010-04-06 2:27 ` Badari Pulavarty
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=4BB1F1DA.2060907@redhat.com \
--to=avi@redhat.com \
--cc=chrisw@sous-sol.org \
--cc=hch@infradead.org \
--cc=kvm@vger.kernel.org \
--cc=pbadari@us.ibm.com \
/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