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

Stefan Priebe s.priebe at profihost.ag
Thu Dec 27 10:03:39 CET 2012


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