summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src/dht-shared.c
diff options
context:
space:
mode:
authorSusant Palai <spalai@redhat.com>2020-04-27 16:59:16 +0530
committerSusant Palai <spalai@redhat.com>2020-07-31 16:22:23 +0000
commit3af9443c770837abe4f54db399623380ab9767a7 (patch)
tree943b631cc5210a721b90287cea201b03bf78a1fe /xlators/cluster/dht/src/dht-shared.c
parentdbff4ecfc18d4d4ad357e2f53806a6caf69d2b65 (diff)
dht: optimize rebalance crawl path
For distribute only volumes we can use the information for local subvolumes to avoid syncop calls which goes through the whole stack to fetch stat and entries. A separate function gf_defrag_fix_layout_puredist is introduced. TODO: A glusterd flag needs to be introduced in case we want to fall back to run the old way. Perf numbers: DirSize - 1Million Old New %diff Depth - 100 (Run 1) 353 74 +377% Depth - 100 (Run 2) 348 72 +377~% Depth - 50 246 122 +100% Depth - 3 174 114 +52% Change-Id: I67cc136cebd34092fd775e69f74c2d5b33d3156d Fixes: #1242 Signed-off-by: Susant Palai <spalai@redhat.com>
Diffstat (limited to 'xlators/cluster/dht/src/dht-shared.c')
-rw-r--r--xlators/cluster/dht/src/dht-shared.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/xlators/cluster/dht/src/dht-shared.c b/xlators/cluster/dht/src/dht-shared.c
index d85b4d1ce13..811bb55925f 100644
--- a/xlators/cluster/dht/src/dht-shared.c
+++ b/xlators/cluster/dht/src/dht-shared.c
@@ -700,6 +700,10 @@ dht_init(xlator_t *this)
pthread_cond_init(&defrag->fc_wakeup_cond, 0);
defrag->global_error = 0;
+
+ defrag->is_pure_distribute = _gf_false;
+
+ defrag->operate_dist = _gf_true;
}
conf->use_fallocate = 1;