qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Thomas Knauth <thomas.knauth@gmx.de>
Cc: Stefan Hajnoczi <stefanha@gmail.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] kvm suspend performance
Date: Wed, 20 Mar 2013 17:06:44 -0600	[thread overview]
Message-ID: <514A4104.9000505@redhat.com> (raw)
In-Reply-To: <CABhLV01dNddgvywSmooSEpe1jF2x55pWxCJCTRQ3unCdF9mTXQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2095 bytes --]

On 03/20/2013 04:44 PM, Thomas Knauth wrote:
> Hi Stefan,
> 
> thanks for taking the time to reply.
> 
> On Wed, Mar 20, 2013 at 9:11 AM, Stefan Hajnoczi <stefanha@gmail.com> wrote:
> 
>> Which QEMU or libvirt command are you using to suspend the guest to
>> disk?
>>
> 
> virsh save <name> <file>

Then this is as much a libvirt question as a qemu question.  Which
version of libvirt?  'virsh save' maps to the qemu 'migrate' monitor
command, with a destination of migration to file.  On older libvirt, we
just relied on qemu's default throttling during migration.  Remember,
qemu throttles migration by default, so that it is less likely to
saturate a network link; but while this makes sense for a migration to a
remote network location, it gets in the way of a migration to a local file.

In newer libvirt, we added code so that when migrating to a file, we
temporarily raise the qemu throttling to be effectively unlimited.  In
my own testing, it provided nearly a 10x speedup on the time for 'virsh
save' on the guests that I was testing on my own machine.

Meanwhile, if your libvirt is too old to have the automatic temporary
change to the throttling limit, you should be able to issue 'virsh
migrate-setspeed $dom 1000000' (or some other large number), to raise
the qemu throttling limits to a much higher rate of MiB/s permitted
during the migration to file.

> Which versions of libvirt and QEMU are you using?
> 
> 
> I've tried this on a couple of machines with differing versions of Ubuntu
> (12.04, 10.10, and 10.04). They are all showing the same performance. The
> machine where I did most of my measurements was the 12.04 machine. The
> versions are libvirt 0.9.8-2ubuntu17 and
> qemu-kvm 1.0+noroms-0ubuntu14.7.

That explains it.  Libvirt migration-to-file with unlimited speed wasn't
until upstream commit v0.10.0-rc0-62-g6cfdeaa.  I really wish the Ubuntu
distro would quit shipping what feels like stone-age libvirt.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 621 bytes --]

  reply	other threads:[~2013-03-20 23:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-19 16:24 [Qemu-devel] kvm suspend performance Thomas Knauth
2013-03-20  8:11 ` Stefan Hajnoczi
2013-03-20 22:44   ` Thomas Knauth
2013-03-20 23:06     ` Eric Blake [this message]
2013-03-23 12:42       ` Thomas Knauth
2013-03-25 15:05         ` Eric Blake

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=514A4104.9000505@redhat.com \
    --to=eblake@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    --cc=thomas.knauth@gmx.de \
    /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).