[pve-devel] [PATCH storage] remove compression option from lvm migration

Wolfgang Bumiller w.bumiller at proxmox.com
Fri Aug 5 09:27:08 CEST 2016


Applied.
But I wonder if we should put a separate compression process in between
dd and ssh as suggested by W.Link (and make it optional).

Additionally I think we should try and add some progress output there.
Ie. send a SIGUSR1 to dd every couple of seconds. (Wouldn't be very
accurate as there's a rather big cache between in the pipe between dd
and ssh, but better than nothing. (scp has the same issue anyway with
its progress output...))

On Thu, Aug 04, 2016 at 11:30:53AM +0200, Dominik Csapak wrote:
> ssh(1) mentions that compression is only disirable on slow
> connections.
> 
> since migration from cluster node to cluster node needs a
> fast network anyway, we can drop the compression for
> a speed improvement
> 
> Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
> ---
> this came up in the forum, and i tested it on my machine.
> from local /tmp to local /tmp with scp
> i got about >500MB/s without compression
> and ~70MB/s with compression enabled
> 
> the file had about 40% zeros and the remainder was
> random data
> 
> i also tested on a virtualized cluster the migration
> of a container on lvm thin (using virtio network)
> 
> with compression: ~100MB/s
> witout compression: ~200MB/s
> 
> so i really think we should not use it
> 
>  PVE/Storage.pm | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/PVE/Storage.pm b/PVE/Storage.pm
> index 991131a..25ff545 100755
> --- a/PVE/Storage.pm
> +++ b/PVE/Storage.pm
> @@ -559,10 +559,10 @@ sub storage_migrate {
>  
>  	    eval {
>  		if ($tcfg->{type} eq 'lvmthin') {
> -		    run_command([["dd", "if=$src"],["/usr/bin/ssh", "root\@${target_host}", "-C",
> +		    run_command([["dd", "if=$src"],["/usr/bin/ssh", "root\@${target_host}",
>  			      "dd", 'conv=sparse', "of=$dst"]]);
>  		} else {
> -		    run_command([["dd", "if=$src"],["/usr/bin/ssh", "root\@${target_host}", "-C",
> +		    run_command([["dd", "if=$src"],["/usr/bin/ssh", "root\@${target_host}",
>  			      "dd", "of=$dst"]]);
>  		}
>  	    };
> -- 
> 2.1.4




More information about the pve-devel mailing list