[pve-devel] [PATCH] since qemu 1.7 xbzrle is AUTOMATICALLY enabled in the end of transfer - we need to explicit disable all feature we do not want

Alexandre DERUMIER aderumier at odiso.com
Mon Feb 10 09:52:52 CET 2014


I have done tests with current proxmox code, and xbzrle is disable by default

capabilities: xbzrle: off x-rdma-pin-all: off auto-converge: on zero-blocks: off 
Migration status: active
total time: 762 milliseconds
expected downtime: 100 milliseconds
setup: 19 milliseconds
transferred ram: 46709 kbytes
throughput: 121.57 mbps
remaining ram: 143232 kbytes
total ram: 2105944 kbytes
duplicate: 478626 pages
skipped: 0 pages
normal: 12051 pages
normal bytes: 48204 kbytes


forcing capability
------------------

capabilities: xbzrle: on x-rdma-pin-all: off auto-converge: on zero-blocks: off 
Migration status: active
total time: 712 milliseconds
expected downtime: 100 milliseconds
setup: 19 milliseconds
transferred ram: 52873 kbytes
throughput: 397.83 mbps
remaining ram: 141216 kbytes
total ram: 2105944 kbytes
duplicate: 478622 pages
skipped: 0 pages
normal: 12559 pages
normal bytes: 50236 kbytes
cache size: 134217728 bytes
xbzrle transferred: 0 kbytes
xbzrle pages: 0 pages
xbzrle cache miss: 0
xbzrle overflow : 0




Are you sure that your vms didn't have xbzrle enabled from a previous migration ?
(Because when the capability is turned on once, it's always enabled for next migrations)



(Anyway, I think we can apply your patches, to be sure that capabilities are turned on or off)



----- Mail original ----- 

De: "Alexandre DERUMIER" <aderumier at odiso.com> 
À: "Stefan Priebe - Profihost AG" <s.priebe at profihost.ag> 
Cc: pve-devel at pve.proxmox.com 
Envoyé: Lundi 10 Février 2014 09:33:17 
Objet: Re: [pve-devel] [PATCH] since qemu 1.7 xbzrle is AUTOMATICALLY enabled in the end of transfer - we need to explicit disable all feature we do not want 

>>you can see if it is off or on by checking the xbzrle cache size during 
>>migration. If it is > 0 it is on. 

maybe this is because we always setup cachesize ? 

#set cachesize 10% of the total memory 
my $cachesize = int($conf->{memory}*1048576/10); 
eval { 
PVE::QemuServer::vm_mon_cmd_nocheck($vmid, "migrate-set-cache-size", value => $cachesize); 
}; 

(Maybe this is forcing xbzrle on ?) 

I'll do tests today. 



----- Mail original ----- 

De: "Stefan Priebe - Profihost AG" <s.priebe at profihost.ag> 
À: "Alexandre DERUMIER" <aderumier at odiso.com> 
Cc: pve-devel at pve.proxmox.com 
Envoyé: Lundi 10 Février 2014 09:28:21 
Objet: Re: [pve-devel] [PATCH] since qemu 1.7 xbzrle is AUTOMATICALLY enabled in the end of transfer - we need to explicit disable all feature we do not want 

Hi Alex, 

you can see if it is off or on by checking the xbzrle cache size during 
migration. If it is > 0 it is on. 

Stefan 
Am 10.02.2014 09:23, schrieb Alexandre DERUMIER: 
>>> No idea why they enable all features now by default. 
> 
> This is strange, if I do a "info migrate" in monitor during the migration, the features are off by default. (at least on source) 
> 
> 
> ----- Mail original ----- 
> 
> De: "Stefan Priebe - Profihost AG" <s.priebe at profihost.ag> 
> À: "Alexandre DERUMIER" <aderumier at odiso.com> 
> Cc: pve-devel at pve.proxmox.com 
> Envoyé: Lundi 10 Février 2014 08:00:22 
> Objet: Re: [pve-devel] [PATCH] since qemu 1.7 xbzrle is AUTOMATICALLY enabled in the end of transfer - we need to explicit disable all feature we do not want 
> 
> 
> Am 10.02.2014 um 07:42 schrieb Alexandre DERUMIER <aderumier at odiso.com>: 
> 
>>>> I won't try them ;-) xbzrle is just unstable since a long time i don't 
>>>> believe it's suddenly stable ;- 
>> 
>> Yes, same here, I also wanted to say that it's was not stable yet. 
> 
> No idea why they enable all features now by default. 
> 
> Stefan 
> 
>> 
>> ----- Mail original ----- 
>> 
>> De: "Stefan Priebe" <s.priebe at profihost.ag> 
>> À: "Alexandre DERUMIER" <aderumier at odiso.com> 
>> Cc: pve-devel at pve.proxmox.com 
>> Envoyé: Dimanche 9 Février 2014 15:24:04 
>> Objet: Re: [pve-devel] [PATCH] since qemu 1.7 xbzrle is AUTOMATICALLY enabled in the end of transfer - we need to explicit disable all feature we do not want 
>> 
>> Am 09.02.2014 14:45, schrieb Alexandre DERUMIER: 
>>> Good catch ! 
>> 
>> Thanks! 
>> 
>>> I see in migration.c 
>>> static MigrationState *migrate_init(const MigrationParams *params) 
>>> { 
>>> ... 
>>> bool enabled_capabilities[MIGRATION_CAPABILITY_MAX]; 
>>> 
>>> So I think that all capabilities are enabled by default now. 
>>> 
>>> (BTW, any chance that xbzlre is related to your migration swap error ?) 
>> 
>> Yes it's exactly xbzrle - that was the reason i detected that it was 
>> enabled. 
>> 
>>> 
>>> I see 2recents commits in qemu 
>>> 
>>> "migration:fix free XBZRLE decoded_buf wrong" 
>>> http://git.qemu.org/?p=qemu.git;a=commit;h=905f26f2221e139ac0e7317ddac158c50f5cf876 
>>> 
>>> "Set xbzrle buffers to NULL after freeing them to avoid double free errors" 
>>> http://git.qemu.org/?p=qemu.git;a=commit;h=f6c6483b259a2395ee44cfa966f622e0f2dbe2ae 
>> 
>> I won't try them ;-) xbzrle is just unstable since a long time i don't 
>> believe it's suddenly stable ;-) 
>> 
>>> ----- Mail original ----- 
>>> 
>>> De: "Stefan Priebe" <s.priebe at profihost.ag> 
>>> À: pve-devel at pve.proxmox.com 
>>> Envoyé: Samedi 8 Février 2014 20:20:55 
>>> Objet: [pve-devel] [PATCH] since qemu 1.7 xbzrle is AUTOMATICALLY enabled in the end of transfer - we need to explicit disable all feature we do not want 
>>> 
>>> 
>>> Signed-off-by: Stefan Priebe <s.priebe at profihost.ag> 
>>> --- 
>>> PVE/QemuServer.pm | 8 +++----- 
>>> 1 file changed, 3 insertions(+), 5 deletions(-) 
>>> 
>>> diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm 
>>> index 8e2184e..3bb9820 100644 
>>> --- a/PVE/QemuServer.pm 
>>> +++ b/PVE/QemuServer.pm 
>>> @@ -3162,12 +3162,10 @@ sub set_migration_caps { 
>>> my $supported_capabilities = vm_mon_cmd_nocheck($vmid, "query-migrate-capabilities"); 
>>> 
>>> for my $supported_capability (@$supported_capabilities) { 
>>> - if ($enabled_cap->{$supported_capability->{capability}} eq 1) { 
>>> - push @$cap_ref, { 
>>> - capability => $supported_capability->{capability}, 
>>> - state => JSON::true, 
>>> + push @$cap_ref, { 
>>> + capability => $supported_capability->{capability}, 
>>> + state => ($enabled_cap->{$supported_capability->{capability}}) ? JSON::true : JSON::false, 
>>> }; 
>>> - } 
>>> } 
>>> 
>>> vm_mon_cmd_nocheck($vmid, "migrate-set-capabilities", capabilities => $cap_ref); 
>>> 
_______________________________________________ 
pve-devel mailing list 
pve-devel at pve.proxmox.com 
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel 



More information about the pve-devel mailing list