From: Stefan Hajnoczi <stefanha@gmail.com>
To: Xingbo Wu <wuxb45@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] I/O parallelism on QCOW2
Date: Fri, 5 Sep 2014 11:02:51 +0100 [thread overview]
Message-ID: <20140905100251.GD18562@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <CABPa+v3jnFJYDxZ0Exzq0sve+VXpZLNF_C_=cGg8fDX5BtXmSA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1128 bytes --]
On Thu, Sep 04, 2014 at 12:32:12PM -0400, Xingbo Wu wrote:
> After running a 16-thread sync-random-write test against qcow2, It is
> observed that QCOW2 seems to be serializing all its metadata-related writes.
> If qcow2 is designed to do this,* then what is the concern?* What would go
> wrong if this ordering is relaxed?
How do you know that serializing part of the write request is a
significant bottleneck?
Please post your benchmark results with raw, qed, and qcow2 handling 1-,
8-, and 16-threads of I/O (or whatever similar benchmarks you have run).
The bottleneck may actually be something else, so please share your
benchmark configuration and results.
> By providing less features, raw-file and QED scales well on parallel I/O
> workload. I believe qcow2 does this with clear reasons. Thanks!
QED serializes allocating writes, see qed_aio_write_alloc().
In qcow2 the BdrvQcowState->lock is held across metadata updates. The
important pieces here are:
* qcow2_co_writev() only releases the lock around data writes
(including COW).
* qcow2_co_flush_to_os() holds the lock around metadata updates
Stefan
[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2014-09-05 10:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-04 16:32 [Qemu-devel] I/O parallelism on QCOW2 Xingbo Wu
2014-09-05 10:02 ` Stefan Hajnoczi [this message]
2014-09-05 16:45 ` Xingbo Wu
2014-09-08 10:09 ` Stefan Hajnoczi
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=20140905100251.GD18562@stefanha-thinkpad.redhat.com \
--to=stefanha@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=wuxb45@gmail.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;
as well as URLs for NNTP newsgroup(s).