All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Snow <jsnow@redhat.com>
To: Qemu-block <qemu-block@nongnu.org>
Cc: Fam Zheng <famz@redhat.com>, qemu-devel <qemu-devel@nongnu.org>,
	Vladimir Sementsov-Ogievskiy <vsementsov@parallels.com>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	"Denis V. Lunev" <den@openvz.org>
Subject: [Qemu-devel] RFC: incremental backups: qmp-block-dirty-bitmap-diff
Date: Tue, 9 Feb 2016 19:48:39 -0500	[thread overview]
Message-ID: <56BA88E7.7010104@redhat.com> (raw)

The thought was raised that it might be useful to create a "diff"
command for bitmaps that allow us to populate a dirty bitmap based on
the difference between a currently loaded disk image and some
point-in-time stored on disk (an earlier full backup, incremental
backup, etc).

I originally voiced a desire for this command in response to how to
recover from a failed post-copy bitmap migration (Talks ongoing for if
we'll pursue that, but let's not worry about that here.)

Another usage (apart from disaster recovery where we -- for whatever
reason -- lost our bitmap or actually even lost an intermediate
differential backup) for this kind of functionality would be to *start*
a new incremental backup chain in a post-hoc fashion -- after we already
made a full backup, but neglected to create a bitmap atomically.

There are some pros and cons here; I wanted to get a general "Yes, that
sounds good" or a "No way, don't bother" before I sunk some hours into
it, at Stefan's suggestion.


Cons:
- Added maintenance burden of yet-another-blockjob that does a fairly
esoteric operation

- Catering to user carelessness. "You should have thought of that earlier!"

- Reading an entire drive could take quite a long time -- Especially if
both the source and the target are through network storage.

- Reading an entire drive to populate a bitmap with the understanding
that an incremental backup is soon to follow is inefficient if the drive
is more than just a little dirty: it may have been quicker to just
create a new full backup and bitmap.

- Not strictly unlocking new functionality in the normative case. (We do
add 'bitmap rebuilding after a freak accident', but this is not the
normative case.)


Pros:
- Since bitmaps (and persistent bitmaps) are off by default, it's nice
to allow users to enable the feature post-hoc. The chance for a
misconfiguration here seems reasonably good, especially considering the
feature hasn't really hit all of the stable distros yet.

- Increases the flexibility overall of how to begin using the
incremental backups feature.

- Allows us to sync bitmaps against images created by external tools if
needed or desired by external backup appliances.

- If the image isn't that much different from the last good backup,
reading the entire drive and writing out only a few changed blocks is
likely to be faster than creating a new full backup, considering reads
tend to be faster than writes -- reading the whole drive will be faster
than writing a new full backup in many cases.

- The fact that a diff+incremental backup may be slower in some cases
than just simply creating a new full backup isn't a good rationale for
why we can't offer this tool for the cases in which it may outperform.

- Read of the last-known-good backup can be done in the background as a
blockjob without impeding VM operation. Writes that occur during this
process can be tracked in a temporary bitmap and merged after the diff
completes.

             reply	other threads:[~2016-02-10  0:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-10  0:48 John Snow [this message]
2016-02-14  8:02 ` [Qemu-devel] RFC: incremental backups: qmp-block-dirty-bitmap-diff Fam Zheng
2016-02-22 22:48   ` John Snow

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=56BA88E7.7010104@redhat.com \
    --to=jsnow@redhat.com \
    --cc=den@openvz.org \
    --cc=famz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=vsementsov@parallels.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.