From: Stefan Hajnoczi <stefanha@gmail.com>
To: Chris Friesen <chris.friesen@windriver.com>
Cc: "Benoît Canet" <benoit.canet@irqsave.net>,
"Paolo Bonzini" <pbonzini@redhat.com>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] is there a limit on the number of in-flight I/O operations?
Date: Thu, 27 Aug 2015 17:37:35 +0100 [thread overview]
Message-ID: <20150827163735.GC8298@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <53FB75CA.6070500@windriver.com>
On Mon, Aug 25, 2014 at 11:43:38AM -0600, Chris Friesen wrote:
> On 08/25/2014 09:12 AM, Chris Friesen wrote:
>
> >I set up another test, checking the inflight value every second.
> >
> >Running just "dd if=/dev/zero of=testfile2 bs=1M count=700
> >oflag=nocache&" gave a bit over 100 inflight requests.
> >
> >If I simultaneously run "dd if=testfile of=/dev/null bs=1M count=700
> >oflag=nocache&" then then number of inflight write requests peaks at 176.
> >
> >I should point out that the above numbers are with qemu 1.7.0, with a
> >ceph storage backend. qemu is started with
> >
> >-drive file=rbd:cinder-volumes/.........
>
> From a stacktrace that I added it looks like the writes are coming in via
> virtio_blk_handle_output().
>
> Looking at virtio_blk_device_init() I see it calling virtio_add_queue(vdev,
> 128, virtio_blk_handle_output);
>
> I wondered if that 128 had anything to do with the number of inflight
> requests, so I tried recompiling with 16 instead. I still saw the number of
> inflight requests go up to 178 and the guest took a kernel panic in
> virtqueue_add_buf() so that wasn't very successful. :)
>
> Following the code path in virtio_blk_handle_write() it looks like it will
> bundle up to 32 writes into a single large iovec-based "multiwrite"
> operation. But from there on down I don't see a limit on how many writes
> can be outstanding at any one time. Still checking the code further up the
> virtio call chain.
Yes, virtio-blk does write merging. Since QEMU 2.4.0 it also does read
request merging.
I suggest using the fio benchmark tool with the following job file to
try submitting 256 I/O requests at the same time:
[randread]
blocksize=4k
filename=/dev/vda
rw=randread
direct=1
ioengine=libaio
iodepth=256
runtime=120
next prev parent reply other threads:[~2015-08-27 16:37 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-18 14:58 [Qemu-devel] is there a limit on the number of in-flight I/O operations? Chris Friesen
2014-07-18 15:24 ` Paolo Bonzini
2014-07-18 16:22 ` Chris Friesen
2014-07-18 20:13 ` Paolo Bonzini
2014-07-18 22:48 ` Chris Friesen
2014-07-19 5:49 ` Paolo Bonzini
2014-07-19 6:27 ` Chris Friesen
2014-07-19 7:23 ` Paolo Bonzini
2014-07-19 8:45 ` Benoît Canet
2014-07-21 14:59 ` Chris Friesen
2014-07-21 15:15 ` Benoît Canet
2014-07-21 15:35 ` Chris Friesen
2014-07-21 15:54 ` Benoît Canet
2014-07-21 16:10 ` Benoît Canet
2014-08-23 0:59 ` Chris Friesen
2014-08-23 7:56 ` Benoît Canet
2014-08-25 15:12 ` Chris Friesen
2014-08-25 17:43 ` Chris Friesen
2015-08-27 16:37 ` Stefan Hajnoczi [this message]
2015-08-27 16:33 ` Stefan Hajnoczi
2014-08-25 21:50 ` Chris Friesen
2014-08-27 5:43 ` Chris Friesen
2015-05-14 13:42 ` Andrey Korolyov
2015-08-26 17:10 ` Andrey Korolyov
2015-08-26 23:31 ` Josh Durgin
2015-08-26 23:47 ` Andrey Korolyov
2015-08-27 0:56 ` Josh Durgin
2015-08-27 16:48 ` Stefan Hajnoczi
2015-08-27 17:05 ` Stefan Hajnoczi
2015-08-27 16:49 ` Stefan Hajnoczi
2015-08-28 0:31 ` Josh Durgin
2015-08-28 8:31 ` Andrey Korolyov
2014-07-21 19:47 ` Benoît Canet
2014-07-21 21:12 ` Chris Friesen
2014-07-21 22:04 ` Benoît Canet
2014-07-18 15:54 ` Andrey Korolyov
2014-07-18 16:26 ` Chris Friesen
2014-07-18 16:30 ` Andrey Korolyov
2014-07-18 16:46 ` Chris Friesen
[not found] <1000957815.25879188.1441820902018.JavaMail.zimbra@redhat.com>
2015-09-09 18:51 ` Jason Dillaman
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=20150827163735.GC8298@stefanha-thinkpad.redhat.com \
--to=stefanha@gmail.com \
--cc=benoit.canet@irqsave.net \
--cc=chris.friesen@windriver.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/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;
as well as URLs for NNTP newsgroup(s).