From: Paolo Bonzini <pbonzini@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: stefanha@gmail.com, jcody@redhat.com,
Eric Blake <eblake@redhat.com>,
qemu-devel@nongnu.org, supriyak@linux.vnet.ibm.com
Subject: Re: [Qemu-devel] [RFC PATCH 2/4] block: add live block commit functionality
Date: Wed, 01 Aug 2012 09:07:43 +0200 [thread overview]
Message-ID: <5018D5BF.4010805@redhat.com> (raw)
In-Reply-To: <5018CD96.3080700@redhat.com>
Il 01/08/2012 08:32, Kevin Wolf ha scritto:
>>>> >>> +enum {
>>>> >>> + /*
>>>> >>> + * Size of data buffer for populating the image file. This should be large
>>>> >>> + * enough to process multiple clusters in a single call, so that populating
>>>> >>> + * contiguous regions of the image is efficient.
>>>> >>> + */
>>>> >>> + COMMIT_BUFFER_SIZE = 512 * 1024, /* in bytes */
>>>> >>> +};
>>> >>
>>> >> Paolo's latest round of patches got to the point of making this
>>> >> configurable for drive-mirror; is that something you should be copying here?
>> >
>> > Yes
> Though its use is very limited for live commit. For the mirror it's
> important because a larger number can mean that more data is
> unnecessarily written, and the target can become larger than the source.
Note that the latest version of mirroring has _two_ knobs:
1) granularity is what decides how much data could be written
unnecessarily, because of the dirty bitmap.
2) buffer size is what decides how much I/O is in flight at one time.
The default values are resp. the cluster size (or 64K for raw) and 10M.
The two together give mirroring some self-tuning capability. For
example in the first part of the mirroring you will likely proceed in
10M chunks with no concurrency; once you're synchronized, you'll
probably send several chunks, perhaps all 64K if the guest does random
writes.
Live commit as it is done now doesn't need any of this complication; it
is just a background operation that does not need to compete with the
guest. So using a larger buffer is indeed always better, and 512K is a
nice intermediate value between mirroring's 64K and 10M extremes.
> For live commit, I think using a larger buffer is always better.
>
> Hm, part of the difference is that I assume that commit uses
> bdrv_is_allocated() to check whether some data must really be copied.
> But then, there's no reason why mirroring couldn't do that as well. Paolo?
We copy a cluster at a time, and that's also the resolution of
bdrv_is_allocated so we wouldn't gain anything. Nice idea though, I had
to mull about it to find the flaw. :)
Paolo
next prev parent reply other threads:[~2012-08-01 7:07 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-31 5:16 [Qemu-devel] [RFC PATCH 0/4] Live block commit Jeff Cody
2012-07-31 5:16 ` [Qemu-devel] [RFC PATCH 1/4] block: add support functions for live commit, to find and delete images Jeff Cody
2012-07-31 17:34 ` Eric Blake
2012-07-31 17:52 ` Jeff Cody
2012-07-31 5:16 ` [Qemu-devel] [RFC PATCH 2/4] block: add live block commit functionality Jeff Cody
2012-07-31 17:51 ` Eric Blake
2012-07-31 17:55 ` Jeff Cody
2012-08-01 6:32 ` Kevin Wolf
2012-08-01 7:07 ` Paolo Bonzini [this message]
2012-08-01 11:23 ` Jeff Cody
2012-07-31 5:16 ` [Qemu-devel] [RFC PATCH 3/4] qerror: new errors for live block commit, QERR_TOP_NOT_FOUND Jeff Cody
2012-07-31 18:35 ` Eric Blake
2012-07-31 5:16 ` [Qemu-devel] [RFC PATCH 4/4] QAPI: add command for live block commit, 'block-commit' Jeff Cody
2012-07-31 18:38 ` Eric Blake
2012-08-14 7:41 ` [Qemu-devel] [RFC PATCH 0/4] Live block commit Tiziano Müller
2012-08-29 13:40 ` Jeff Cody
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=5018D5BF.4010805@redhat.com \
--to=pbonzini@redhat.com \
--cc=eblake@redhat.com \
--cc=jcody@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
--cc=supriyak@linux.vnet.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;
as well as URLs for NNTP newsgroup(s).