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 <stefa...@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: signature.asc
Description: OpenPGP digital signature

Reply via email to