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

Dominik Csapak d.csapak at proxmox.com
Thu Aug 4 11:30:53 CEST 2016


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