[pve-devel] [PATCH 3/3] add downtime && expected_downtime query-migrate info

Alexandre DERUMIER aderumier at odiso.com
Thu Dec 27 10:09:09 CET 2012


for me expected downtime is 0 until the end of the migration.

here a sample log, using default 30ms downtime.

Dec 27 07:24:06 starting migration of VM 99999 to node 'kvmtest2' (10.3.94.47)
Dec 27 07:24:06 copying disk images
Dec 27 07:24:06 starting VM 99999 on remote node 'kvmtest2'
Dec 27 07:24:08 starting migration tunnel
Dec 27 07:24:09 starting online/live migration on port 60000
Dec 27 07:24:09 migrate_set_speed: 8589934592
Dec 27 07:24:11 migration status: active (transferred 66518837, remaining 8314994688), total 8397455360, expected downtime 0)
Dec 27 07:24:13 migration status: active (transferred 121753397, remaining 8259760128), total 8397455360, expected downtime 0)
Dec 27 07:24:15 migration status: active (transferred 171867087, remaining 7475191808), total 8397455360, expected downtime 0)
Dec 27 07:24:17 migration status: active (transferred 178976948, remaining 4921823232), total 8397455360, expected downtime 0)
Dec 27 07:24:19 migration status: active (transferred 227210472, remaining 4726611968), total 8397455360, expected downtime 0)
Dec 27 07:24:21 migration status: active (transferred 282889143, remaining 4361879552), total 8397455360, expected downtime 0)
Dec 27 07:24:23 migration status: active (transferred 345327372, remaining 4270788608), total 8397455360, expected downtime 0)
Dec 27 07:24:25 migration status: active (transferred 407383430, remaining 4185169920), total 8397455360, expected downtime 0)
Dec 27 07:24:27 migration status: active (transferred 469084514, remaining 3742027776), total 8397455360, expected downtime 0)
Dec 27 07:24:29 migration status: active (transferred 469687094, remaining 1273860096), total 8397455360, expected downtime 0)
Dec 27 07:24:31 migration status: active (transferred 501247097, remaining 79024128), total 8397455360, expected downtime 3893)
Dec 27 07:24:33 migration status: active (transferred 532052759, remaining 103800832), total 8397455360, expected downtime 139)
Dec 27 07:24:35 migration status: active (transferred 593541297, remaining 34357248), total 8397455360, expected downtime 85)
Dec 27 07:24:35 migration status: active (transferred 603842750, remaining 37982208), total 8397455360, expected downtime 44)
Dec 27 07:24:36 migration status: active (transferred 612899069, remaining 28667904), total 8397455360, expected downtime 44)
Dec 27 07:24:36 migration status: active (transferred 623036734, remaining 30404608), total 8397455360, expected downtime 43)
Dec 27 07:24:36 migration status: active (transferred 632519102, remaining 28622848), total 8397455360, expected downtime 38)
Dec 27 07:24:36 migration status: active (transferred 638048739, remaining 26222592), total 8397455360, expected downtime 33)
Dec 27 07:24:37 migration speed: 285.71 MB/s - downtime 648 ms
Dec 27 07:24:37 migration status: completed
Dec 27 07:24:42 migration finished successfuly (duration 00:00:36)
TASK OK
----- Mail original ----- 

De: "Stefan Priebe" <s.priebe at profihost.ag> 
À: "Alexandre Derumier" <aderumier at odiso.com> 
Cc: pve-devel at pve.proxmox.com 
Envoyé: Jeudi 27 Décembre 2012 10:03:39 
Objet: Re: [pve-devel] [PATCH 3/3] add downtime && expected_downtime query-migrate info 

Hi, 

to me the whole VM stalls when the new expected downtime is 0. (64bit VM 
4GB Mem 1GB in use VM totally IDLE). 

That's why a low migration_downtime value help for me as qemu does no 
longer believe that the expected downtime is 0. 

Greets, 
Stefan 

Am 27.12.2012 09:18, schrieb Alexandre Derumier: 
> 
> Signed-off-by: Alexandre Derumier <aderumier at odiso.com> 
> --- 
> PVE/QemuMigrate.pm | 6 ++++-- 
> 1 file changed, 4 insertions(+), 2 deletions(-) 
> 
> diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm 
> index 282cbc5..38f1d05 100644 
> --- a/PVE/QemuMigrate.pm 
> +++ b/PVE/QemuMigrate.pm 
> @@ -402,7 +402,8 @@ sub phase2 { 
> my $delay = time() - $start; 
> if ($delay > 0) { 
> my $mbps = sprintf "%.2f", $conf->{memory}/$delay; 
> - $self->log('info', "migration speed: $mbps MB/s"); 
> + my $downtime = $stat->{downtime} || 0; 
> + $self->log('info', "migration speed: $mbps MB/s - downtime $downtime ms"); 
> } 
> } 
> 
> @@ -424,11 +425,12 @@ sub phase2 { 
> my $xbzrlepages = $stat->{"xbzrle-cache"}->{"pages"} || 0; 
> my $xbzrlecachemiss = $stat->{"xbzrle-cache"}->{"cache-miss"} || 0; 
> my $xbzrleoverflow = $stat->{"xbzrle-cache"}->{"overflow"} || 0; 
> + my $expected_downtime = $stat->{"expected-downtime"} || 0; 
> #reduce sleep if remainig memory if lower than the everage transfert 
> $usleep = 300000 if $avglstat && $rem < $avglstat; 
> 
> $self->log('info', "migration status: $stat->{status} (transferred ${trans}, " . 
> - "remaining ${rem}), total ${total})"); 
> + "remaining ${rem}), total ${total}) , expected downtime ${expected_downtime}"); 
> 
> #$self->log('info', "migration xbzrle cachesize: ${xbzrlecachesize} transferred ${xbzrlebytes} pages ${xbzrlepages} cachemiss ${xbzrlecachemiss} overflow ${xbzrleoverflow}"); 
> } 
> 



More information about the pve-devel mailing list