qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: Dietmar Maurer <dietmar@proxmox.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH v4 3/6] add backup related monitor commands
Date: Fri, 8 Mar 2013 11:48:24 +0100	[thread overview]
Message-ID: <20130308104824.GB32107@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <24E144B8C0207547AD09C467A8259F7557B2D551@lisa.maurer-it.com>

On Thu, Mar 07, 2013 at 09:28:40AM +0000, Dietmar Maurer wrote:
> > > When we run backup, we need to read such block on every write from the
> > guest.
> > > So if we increase block size we get additional delays.
> > 
> > Don't increase the bitmap block size.
> > 
> > Just let the block job do larger reads.  This is the bulk of the I/O workload.  You
> > can use large reads here independently of the bitmap block size.
> > 
> > That way guest writes still only have a 64 KB read overhead but you reduce the
> > overhead of doing so many 64 KB writes from the backup block job.
> 
> If there are many writes from the guest, you still get many 64KB block.

In the common case the backup block job does significantly more I/O than
the guest, unless your workload is dd if=/dev/vda of=/dev/null.
Remember the block job is reading the *entire* disk!

> Anyways, and additional RPC layer always adds overhead, and It can be completely avoided.
> Maybe not much, but I want to make backup as efficient as possible.

The drawbacks outweight the performance advantage:

1. QEMU can neither backup nor restore without help from the management
   tool.  This is a strong indicator that the backup archive code should
   live outside QEMU.  I doesn't make sense for proxmox, oVirt,
   OpenStack, and others to each maintain their backup archive code
   inside qemu.git, tied to QEMU's C codebase, release cycle, and
   license.

2. QEMU already has interfaces to export the vmstate and block device
   snapshots: migration/savevm and BlockDriverState (NBD for IPC or
   raw/qcow2/vmdk for file).  It is not necessary to add a
   special-purpose interface just for backup.

3. The backup block job can be composed together with other QMP commands
   to achieve scenarios besides just VMA backup.  It's more flexible to
   add simple primitives that can be combined instead of adding a
   monolithic backup command.

For these reasons, I'm against putting backup archive code into QEMU.

If performance is key, please look into incremental backups.  Taking a
full copy of the disk image every time affects guest performance much
more than IPC overhead.  Plus there'll be less IPC if only dirty blocks
are backed up :).

Stefan

  reply	other threads:[~2013-03-08 10:48 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20130220142939.GF16633@stefanha-thinkpad.muc.redhat.com>
     [not found] ` <24E144B8C0207547AD09C467A8259F7557A6EFE2@lisa.maurer-it.com>
     [not found]   ` <20130221130345.GD22957@stefanha-thinkpad.redhat.com>
     [not found]     ` <24E144B8C0207547AD09C467A8259F7557A6FAAC@lisa.maurer-it.com>
     [not found]       ` <20130222095736.GA6107@stefanha-thinkpad.redhat.com>
     [not found]         ` <24E144B8C0207547AD09C467A8259F7557A70A61@lisa.maurer-it.com>
     [not found]           ` <20130225134551.GE3202@stefanha-thinkpad.redhat.com>
     [not found]             ` <24E144B8C0207547AD09C467A8259F7557AE0931@lisa.maurer-it.com>
     [not found]               ` <20130228144920.GD18389@stefanha-thinkpad.redhat.com>
     [not found]                 ` <24E144B8C0207547AD09C467A8259F7557B12DDC@lisa.maurer-it.com>
2013-03-04 12:58                   ` [Qemu-devel] [PATCH v4 3/6] add backup related monitor commands Stefan Hajnoczi
2013-03-04 13:16                     ` Dietmar Maurer
2013-03-04 13:55                       ` Kevin Wolf
2013-03-04 14:33                         ` Dietmar Maurer
2013-03-06 12:44                           ` Stefan Hajnoczi
2013-03-06 14:42                             ` Dietmar Maurer
2013-03-06 15:22                               ` Kevin Wolf
2013-03-06 15:33                                 ` Dietmar Maurer
2013-03-06 15:48                                   ` Kevin Wolf
2013-03-06 17:39                                     ` Dietmar Maurer
2013-03-07  9:04                                       ` Kevin Wolf
2013-03-07  9:22                                         ` Dietmar Maurer
2013-03-07  9:05                               ` Stefan Hajnoczi
2013-03-07  9:28                                 ` Dietmar Maurer
2013-03-08 10:48                                   ` Stefan Hajnoczi [this message]
2013-03-08 11:01                                     ` Dietmar Maurer
2013-03-08 16:29                                       ` Stefan Hajnoczi
2013-03-08 17:44                                         ` Dietmar Maurer
2013-03-10  6:43                                           ` Stefan Hajnoczi
2013-03-10  9:32                                             ` Dietmar Maurer
2013-03-10 11:11                                               ` Stefan Hajnoczi
2013-03-09 14:13                                         ` 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=20130308104824.GB32107@stefanha-thinkpad.redhat.com \
    --to=stefanha@gmail.com \
    --cc=dietmar@proxmox.com \
    --cc=kwolf@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).