qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Migration speed throttling, max_throttle in migration.c


From: Anthony Liguori
Subject: Re: [Qemu-devel] Migration speed throttling, max_throttle in migration.c
Date: Wed, 09 Feb 2011 21:02:38 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.15) Gecko/20101027 Lightning/1.0b1 Thunderbird/3.0.10

On 02/09/2011 07:13 PM, Thomas Treutner wrote:
Hi,

I was reading qemu's (qemu-kvm-0.13.0's, to be specific) live migration code to unterstand how the iterative dirty page transfer is implemented. During this I noticed that ram_save_live in arch_init.c is called quite often, more often than I expected (approx. 200 times for an idle 500MiB VM). I found out that this is because of while (!qemu_file_rate_limit(f)), which evaluates very often to true, and as there are remaining dirty pages, ram_save_live is called again.

As I had set no bandwith limit in the libvirt call, I digged deeper and found a hard coded maximum bandwidth in migration.c:

/* Migration speed throttling */
static uint32_t max_throttle = (32 << 20);

Using a packet sniffer I verified that max_throttle is Byte/s, here of course 32 MiB/s. Additionally, it translates directly to network bandwidth - I was not sure about that, as the bandwidth measured in ram_save_live seems to be buffer/memory subsystem bandwidth?

Because that was roughly how fast my laptop's hard drive was and we had a very bad implementation of migration to file and the limit was the only way to avoid pausing the guest.

The reason it's still this today is mainly historic. I've thought about making the default limit unlimited. I'm not sure if anyone has strong opinions.

Regards,

Anthony Liguori




reply via email to

[Prev in Thread] Current Thread [Next in Thread]