qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: Fam Zheng <famz@redhat.com>,
	qemu-block@nongnu.org, qemu-devel@nongnu.org, mreitz@redhat.com,
	vsementsov@parallels.com, Stefan Hajnoczi <stefanha@redhat.com>,
	jsnow@redhat.com
Subject: Re: [Qemu-devel] [RFC PATCH 00/16] Qemu Bit Map (QBM) - an overlay format for persistent dirty bitmap
Date: Tue, 23 Feb 2016 12:28:01 +0100	[thread overview]
Message-ID: <20160223112801.GB8176@noname.redhat.com> (raw)
In-Reply-To: <87k2lv94br.fsf@blackfin.pond.sub.org>

Am 23.02.2016 um 10:14 hat Markus Armbruster geschrieben:
> Kevin Wolf <kwolf@redhat.com> writes:
> 
> > Am 26.01.2016 um 11:38 hat Fam Zheng geschrieben:
> >> This series introduces a simple format to enable support of persistence of
> >> block dirty bitmaps. Block dirty bitmap is the tool to achieve incremental
> >> backup, and persistence of block dirty bitmap makes incrememtal backup possible
> >> across VM shutdowns, where existing in-memory dirty bitmaps cannot survive.
> >> 
> >> When user creates a "persisted" dirty bitmap, the QBM driver will create a
> >> binary file and synchronize it with the existing in-memory block dirty bitmap
> >> (BdrvDirtyBitmap). When the VM is powered down, the binary file has all the
> >> bits saved on disk, which will be loaded and used to initialize the in-memory
> >> block dirty bitmap next time the guest is started.
> >> 
> >> The idea of the format is to reuse as much existing infrastructure as possible
> >> and avoid introducing complex data structures - it works with any image format,
> >> by gluing it together plain bitmap files with a json descriptor file. The
> >> advantage of this approach over extending existing formats, such as qcow2, is
> >> that the new feature is implemented by an orthogonal driver, in a format
> >> agnostic way. This way, even raw images can have their persistent dirty
> >> bitmaps.  (And you will notice in this series, with a little forging to the
> >> spec, raw images can also have backing files through a QBM overlay!)
> >> 
> >> Rather than superseding it, this intends to be coexistent in parallel with the
> >> qcow2 bitmap extension that Vladimir is working on.  The block driver interface
> >> changes in this series also try to be generic and compatible for both drivers.
> >
> > So as I already told Fam last week, before we discuss any technical
> > details here, we first need to discuss whether this is even the right
> > thing to do.
> 
> Yes, this must come first.
> 
> >              Currently I'm doubtful, as this is another attempt to
> > introduce a new native image format in qemu.
> >
> > Let's recap the image formats and what we tell users about them today:
> >
> > * qcow2: This is the default choice for disk images. It gives you access
> >   to all of the features in qemu at a good performance. If it doesn't
> >   perform well in your case, we'll fix it.
> 
> Rather: we'll fix it if we can.

Right. The assumption is so far that we generally can. If it turns out
at some point that we can't improve it sufficiently and a new format
could improve it, then the whole approach of having only raw and qcow2
is indeed in question.

If you look at how different the various VMDK subformats are, though, it
seems that we still have more than enough maneuvering room. I think
having optional features in the format are preferrable to multiple
user-visible formats. For most people, VMDK is just VMDK, and there is
no reason why they should know about the subformats. Similarly, it would
be good if qemu users didn't have to know about qcow2, qed, fvd, qbm...

> > * raw: Use this when you need absolute performance and don't need any
> >   features from an image format, so you want to get any complexity just
> >   out of the way and pass requests as directly as possible from the
> >   guest device to the host kernel.
> >
> > * Anything else: Only use them to convert into raw or qcow2.
> >
> > Now using bitmaps is clearly on the "features" side, which suggests that
> > qcow2 is the format of choice for this.
> 
> I'd agree with a general "extra feature suggests QCOW2" maxim, with
> stress on "suggests".
> 
> However, the "extraness" of bitmaps is perhaps less clear than for other
> features.  Bitmap-like things occur not just in formats: sparse files,
> thinly provisioned SCSI devices, ...
> 
> >                                         If you want to introduce a new
> > format, you need to justify it with evidence that...
> >
> > 1. there is a relevant use case that qcow2 doesn't cover
> > 2. qcow2 can't be fixed/enhanced to cover the use case
> >
> > The one thing that people have claimed in the past that qcow2 can't
> > provide is enough performance. This is where QED tried to come in and
> > promised a compromise between performance (then a bit faster than qcow2)
> > and features (almost none, but supports backing files). We all know that
> > it was a failure because you had to sacrifice features and still the
> > idea that qcow2 couldn't be fixed was wrong, so today we have a QED
> > driver that is much slower than qcow2 despite having less features.
> 
> Yes.  We thought QCOW2 could not be made to perform[*], until you did.
> 
> New storage hardware will bring back performance pressure with a
> vengeance, though.

Then we'll have to address them. Not only for dirty bitmaps, but also
for snapshots and all the other features you only get with an image
format.

> > Now for QBM. First, let's have a look at the image format that it can be
> > used with. qcow2 doesn't need it if we continue with Vladimir's
> > extension. Other non-raw formats are only supposed to be used for
> > conversion. The only thing that's really left is raw. Now adding a
> > feature only for raw, as a compromise between features and performance,
> > looks an awful lot like what QED tried. We don't want to go there.
> 
> A possible difference: complexity.
> 
> Adding another QEMU-native format in QCOW2's complexity class would be
> highly problematic.  We tried with QED, because we thought we'd need it
> to support different tradeoffs, but it turned out to be a dead end.
> 
> Doesn't mean there's absolutely no space for a *simple* format to
> support different tradeoffs.  Is QBM simple enough?  Will it stay simple
> enough?

Good questions. I'd put a different one first, though: Can the different
tradeoffs be accommodated with (new options to) an existing format (i.e.
qcow2)? If it can, no matter how simple we think the driver would end
up, we probably don't want the duplication.

That was assuming for a moment that this tradeoff is even relevant,
which hasn't been shown. I'm actucally not completely sure yet that
we're not discussing a solution in search of a problem here.

Kevin

      reply	other threads:[~2016-02-23 11:28 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-26 10:38 [Qemu-devel] [RFC PATCH 00/16] Qemu Bit Map (QBM) - an overlay format for persistent dirty bitmap Fam Zheng
2016-01-26 10:38 ` [Qemu-devel] [RFC PATCH 01/16] doc: Add QBM format specification Fam Zheng
2016-01-26 17:51   ` Eric Blake
2016-02-09  0:05     ` John Snow
2016-02-23  8:35     ` Markus Armbruster
2016-02-08 23:51   ` John Snow
2016-02-17 11:48   ` Vladimir Sementsov-Ogievskiy
2016-02-17 16:30   ` Vladimir Sementsov-Ogievskiy
2016-01-26 10:38 ` [Qemu-devel] [RFC PATCH 02/16] block: Set dirty before doing write Fam Zheng
2016-01-26 17:52   ` Eric Blake
2016-02-09  0:11   ` John Snow
2016-01-26 10:38 ` [Qemu-devel] [RFC PATCH 03/16] block: Allow .bdrv_close callback to release dirty bitmaps Fam Zheng
2016-01-26 17:53   ` Eric Blake
2016-02-09  0:23   ` John Snow
2016-01-26 10:38 ` [Qemu-devel] [RFC PATCH 04/16] block: Move filename_decompose to block.c Fam Zheng
2016-01-27 16:07   ` Eric Blake
2016-02-09 20:56   ` John Snow
2016-01-26 10:38 ` [Qemu-devel] [RFC PATCH 05/16] block: Make bdrv_get_cluster_size public Fam Zheng
2016-01-27 16:08   ` Eric Blake
2016-02-09 21:06   ` John Snow
2016-01-26 10:38 ` [Qemu-devel] [RFC PATCH 06/16] block: Introduce bdrv_dirty_bitmap_set_persistent Fam Zheng
2016-02-09 21:31   ` John Snow
2016-02-09 22:04   ` John Snow
2016-01-26 10:38 ` [Qemu-devel] [RFC PATCH 07/16] block: Only swap non-persistent dirty bitmaps Fam Zheng
2016-01-26 10:38 ` [Qemu-devel] [RFC PATCH 08/16] qmp: Add optional parameter "persistent" in block-dirty-bitmap-add Fam Zheng
2016-02-09 22:05   ` John Snow
2016-01-26 10:38 ` [Qemu-devel] [RFC PATCH 09/16] qmp: Add block-dirty-bitmap-set-persistent Fam Zheng
2016-02-09 22:49   ` John Snow
2016-01-26 10:38 ` [Qemu-devel] [RFC PATCH 10/16] qbm: Implement format driver Fam Zheng
2016-02-17 13:30   ` Vladimir Sementsov-Ogievskiy
2016-01-26 10:38 ` [Qemu-devel] [RFC PATCH 11/16] qapi: Add "qbm" as a generic cow " Fam Zheng
2016-01-26 10:38 ` [Qemu-devel] [RFC PATCH 12/16] iotests: Add qbm format to 041 Fam Zheng
2016-01-26 10:38 ` [Qemu-devel] [RFC PATCH 13/16] iotests: Add qbm to case 097 Fam Zheng
2016-01-26 10:38 ` [Qemu-devel] [RFC PATCH 14/16] iotests: Add qbm to applicable test cases Fam Zheng
2016-01-26 10:38 ` [Qemu-devel] [RFC PATCH 15/16] iotests: Add qbm specific test case 140 Fam Zheng
2016-01-26 10:38 ` [Qemu-devel] [RFC PATCH 16/16] iotests: Add persistent bitmap test case 141 Fam Zheng
2016-02-22 14:24 ` [Qemu-devel] [RFC PATCH 00/16] Qemu Bit Map (QBM) - an overlay format for persistent dirty bitmap Kevin Wolf
2016-02-23  3:40   ` Fam Zheng
2016-02-23 17:43     ` Kevin Wolf
2016-02-24  0:49       ` Fam Zheng
2016-02-23  9:14   ` Markus Armbruster
2016-02-23 11:28     ` Kevin Wolf [this message]

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=20160223112801.GB8176@noname.redhat.com \
    --to=kwolf@redhat.com \
    --cc=armbru@redhat.com \
    --cc=famz@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=mreitz@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 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).