From 5bb9557265607638a87c78ef03665d32a406db98 Mon Sep 17 00:00:00 2001
From: Michael Hanselmann <hansmi@google.com>
Date: Fri, 11 Jun 2010 19:01:16 +0200
Subject: [PATCH] Disable compression for all intra-cluster imports/exports

Tests have shown that usually we're CPU-bound for intra-cluster
imports/exports. Disabling compression will help with this.

Some versions of OpenSSL, depending on the build options, also
compress transparently. This will need further work in Ganeti.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
---
 lib/masterd/instance.py | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/lib/masterd/instance.py b/lib/masterd/instance.py
index 46eaabf10..df0b18754 100644
--- a/lib/masterd/instance.py
+++ b/lib/masterd/instance.py
@@ -996,11 +996,8 @@ def TransferInstanceData(lu, feedback_fn, src_node, dest_node, dest_ip,
            each transfer
 
   """
-  # Compress only if transfer is to another node
-  if src_node == dest_node:
-    compress = constants.IEC_NONE
-  else:
-    compress = constants.IEC_GZIP
+  # Disable compression for all moves as these are all within the same cluster
+  compress = constants.IEC_NONE
 
   logging.debug("Source node %s, destination node %s, compression '%s'",
                 src_node, dest_node, compress)
-- 
GitLab