qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Dietmar Maurer <dietmar@proxmox.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH 1/5] RFC: Efficient VM backup for qemu (v1)
Date: Wed, 21 Nov 2012 14:58:15 +0100	[thread overview]
Message-ID: <50ACDDF7.5050603@redhat.com> (raw)
In-Reply-To: <24E144B8C0207547AD09C467A8259F755782DA08@lisa.maurer-it.com>

Am 21.11.2012 14:25, schrieb Dietmar Maurer:
>>> AFAIK qcow2 file cannot store data out of order. In general, an backup
>>> fd is not seekable, and we only want to do sequential writes. Image format
>> always requires seekable fds?
>>
>> Ah, this is what you mean by "out of order". Just out of curiosity, what are
>> these non-seekable backup fds usually?
> 
> /dev/nst0 ;-)

Sure. :-)

> But there are better examples. Usually you want to use some kind of
> compression, and you do that with existing tools:
> 
> # backup to stdout|gzip|...

When you use an image/archive format anyway, you could use a compression
mechanism that it already supports.

> A common usage scenario is to pipe a backup into a restore (copy)
> 
> # backup to stdout|ssh to remote host -c 'restore from stdin'

This is a good one. I believe our usual solution would have been to
backup to a NBD server on the remote host instead.

In general I can see that being able to pipe it to other programs could
be nice. I'm not sure if it's an absolute requirement. Would your tools
for taking the backup employ any specific use of pipes?

> It is also a performance question. Seeks are terrible slow.

You wouldn't do it a lot. Only for metadata, and you would only write
out the metadata once the in-memory cache is full.

>> In principle even for this qcow2 could be used as an image format, however
>> the existing implementation wouldn't be of much use for you, so it loses
>> quite a bit of its attractiveness.
>>
>>> Anyways, a qcow2 file is really complex beast - I am quite unsure if I
>>> would use that for backup if it is possible.
>>>
>>> That would require any external tool to include >=50000 LOC
>>>
>>> The vma reader code is about 700 LOC (quite easy).
>>
>> So what? qemu-img is already there.
> 
> Anyways, you already pointed out that the existing implementation does not work.

I'm still trying to figure out the real requirements to think some more
about it. :-)

> But I already expected such discussion. So maybe it is better we simply pipe all data to an external binary?
> We just need to define a minimal protocol. 
> 
> In future we can produce different archivers as independent/external binaries?

You shouldn't look at discussions as a bad thing. We're not trying to
block your changes, but to understand and possibly improve them.

Yes, discussions mean that it takes a bit longer to get things merged,
but they also mean that usually something better is merged in the end
that actually fits well in qemu's design, is maintainable, generic and
so on. Evading the discussions by keeping code externally wouldn't
improve things.

Which doesn't mean that external archivers are completely out of the
question, but I would only consider them if there's a good technical
reason to do so.

So if eventually we come to the conclusion that vma (or for that matter,
anything else in your patches) is the right solution, let's take it. But
first please give us the chance to understand the reasons of why you did
things the way you did them, and to discuss the pros and cons of
alternative solutions.

Kevin

  reply	other threads:[~2012-11-21 13:58 UTC|newest]

Thread overview: 73+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-21  9:01 [Qemu-devel] [PATCH 1/5] RFC: Efficient VM backup for qemu (v1) Dietmar Maurer
2012-11-21  9:01 ` [Qemu-devel] [PATCH 2/5] add basic backup support to block driver Dietmar Maurer
2012-11-22 11:25   ` Stefan Hajnoczi
2012-11-22 11:29     ` Dietmar Maurer
2012-11-23  8:56     ` Dietmar Maurer
2012-11-21  9:01 ` [Qemu-devel] [PATCH 3/5] introduce new vma archive format Dietmar Maurer
2012-11-21 16:06   ` Eric Blake
2012-11-21 17:56     ` Dietmar Maurer
2012-11-21  9:01 ` [Qemu-devel] [PATCH 4/5] add backup related monitor commands Dietmar Maurer
2012-11-21 16:16   ` Eric Blake
2012-11-21 17:59     ` Dietmar Maurer
2012-11-21 18:49     ` Dietmar Maurer
2012-11-21  9:01 ` [Qemu-devel] [PATCH 5/5] add regression tests for backup Dietmar Maurer
2012-11-21 10:48 ` [Qemu-devel] [PATCH 1/5] RFC: Efficient VM backup for qemu (v1) Kevin Wolf
2012-11-21 11:10   ` Dietmar Maurer
2012-11-21 12:37     ` Kevin Wolf
2012-11-21 13:23       ` Paolo Bonzini
2012-11-23  7:42         ` Dietmar Maurer
2012-11-23  9:18           ` Paolo Bonzini
2012-11-23  9:28             ` Dietmar Maurer
2012-11-23  8:12         ` Dietmar Maurer
2012-11-23  9:01           ` Dietmar Maurer
2012-11-23  9:05             ` Dietmar Maurer
2012-11-23  9:15               ` Paolo Bonzini
2012-11-23  9:17                 ` Dietmar Maurer
2012-11-23  9:55               ` Kevin Wolf
2012-11-23 10:55                 ` Markus Armbruster
2012-11-21 13:25       ` Dietmar Maurer
2012-11-21 13:58         ` Kevin Wolf [this message]
2012-11-21 15:47           ` Dietmar Maurer
2012-11-23  7:38       ` Dietmar Maurer
2012-11-23  9:08         ` Kevin Wolf
2012-11-23  9:21           ` Dietmar Maurer
2012-11-23  9:31             ` Dietmar Maurer
2012-11-23 10:29               ` Kevin Wolf
2012-11-26  5:51                 ` Dietmar Maurer
2012-11-26 12:07                   ` Paolo Bonzini
2012-11-27  6:20                     ` Dietmar Maurer
2012-11-27  7:15                       ` Dietmar Maurer
2012-11-27  8:48                         ` Kevin Wolf
2012-11-27 10:24                           ` Dietmar Maurer
2012-11-21 11:23   ` Dietmar Maurer
2012-11-22 11:12 ` Stefan Hajnoczi
2012-11-22 11:26   ` Dietmar Maurer
2012-11-22 12:44     ` Stefan Hajnoczi
2012-11-22 12:55       ` Dietmar Maurer
2012-11-22 15:30         ` Stefan Hajnoczi
2012-11-22 15:58           ` Dietmar Maurer
2012-11-22 17:02             ` Stefan Hajnoczi
2012-11-22 17:34               ` Dietmar Maurer
2012-11-22 11:40   ` Dietmar Maurer
2012-11-22 15:42     ` Stefan Hajnoczi
2012-11-22 12:00   ` Dietmar Maurer
2012-11-22 15:45     ` Stefan Hajnoczi
2012-11-22 15:56       ` Dietmar Maurer
2012-11-22 16:37         ` Stefan Hajnoczi
2012-11-22 12:03   ` Dietmar Maurer
2012-11-22 17:16   ` Stefan Hajnoczi
2012-11-22 17:46     ` Dietmar Maurer
2012-11-23  5:23       ` Stefan Hajnoczi
2012-11-23  5:25         ` Stefan Hajnoczi
2012-11-23  6:18           ` Dietmar Maurer
2012-11-23  6:13         ` Dietmar Maurer
2012-11-22 17:50     ` Dietmar Maurer
2012-11-23  5:21       ` Stefan Hajnoczi
2012-11-22 18:05     ` Dietmar Maurer
2012-11-23  5:19       ` Stefan Hajnoczi
2012-11-23  6:05         ` Dietmar Maurer
2012-11-22 18:15     ` Dietmar Maurer
2012-11-27 10:09 ` Wenchao Xia
2012-11-27 10:37   ` Dietmar Maurer
2012-11-28  9:39     ` Wenchao Xia
2012-11-28 11:08       ` Dietmar Maurer

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=50ACDDF7.5050603@redhat.com \
    --to=kwolf@redhat.com \
    --cc=dietmar@proxmox.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).