Blob Blame History Raw
From 3afb91d319e3eabb2e50c24365769724542e05ed Mon Sep 17 00:00:00 2001
From: Shreyas Siravara <sshreyas@fb.com>
Date: Thu, 4 Aug 2016 11:44:53 -0700
Subject: [PATCH 391/393] dht/rebalance: Increase maximum read block size from
 128 KB to 1 MB

Summary:
- The maximum block size, `DHT_REBALANCE_BLKSIZE`, is set to 128 KB.
- As a result, migrating files in the megabytes to gigabytes can take much longer than necessary.
- Some preliminary results by bumping the blocksize:

With 128 KB:
  [2016-08-04 11:40:19.251167] I [MSGID: 109028] [dht-rebalance.c:2196:gf_defrag_status_get] 0-glusterfs: Rebalance is completed. Time taken is 15.00 secs
  [2016-08-04 11:40:19.251189] I [MSGID: 109028] [dht-rebalance.c:2200:gf_defrag_status_get] 0-glusterfs: Files migrated: 49, size: 2569011200, lookups: 149, failures: 0, skipped: 0

With 1 MB:
  [2016-08-04 11:41:21.093662] I [MSGID: 109028] [dht-rebalance.c:2196:gf_defrag_status_get] 0-glusterfs: Rebalance is completed. Time taken is 7.00 secs
  [2016-08-04 11:41:21.093687] I [MSGID: 109028] [dht-rebalance.c:2200:gf_defrag_status_get] 0-glusterfs: Files migrated: 49, size: 2569011200, lookups: 149, failures: 0, skipped: 0

- This is a cherry-pick of D3670927 to 3.8.

Test Plan: Tested rebalance on devserver.

Reviewed By: dph, rwareing

> Signed-off-by: Shreyas Siravara <sshreyas@fb.com>
> Reviewed-on: https://review.gluster.org/16797
> Tested-by: Vijay Bellur <vbellur@redhat.com>
> Smoke: Gluster Build System <jenkins@build.gluster.org>
> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>

Change-Id: Ide2edbf87ef9ae2b32a03f189c57b63e2f233fc8
BUG: 1442943
Signed-off-by: Susant Palai <spalai@redhat.com>
Reviewed-on: https://code.engineering.redhat.com/gerrit/103900
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
---
 xlators/cluster/dht/src/dht-rebalance.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c
index 7c1a1d2..ec9102c 100644
--- a/xlators/cluster/dht/src/dht-rebalance.c
+++ b/xlators/cluster/dht/src/dht-rebalance.c
@@ -21,7 +21,7 @@
 
 #define GF_DISK_SECTOR_SIZE             512
 #define DHT_REBALANCE_PID               4242 /* Change it if required */
-#define DHT_REBALANCE_BLKSIZE           (128 * 1024)
+#define DHT_REBALANCE_BLKSIZE           (1024 * 1024)  /* 1 MB */
 #define MAX_MIGRATE_QUEUE_COUNT         500
 #define MIN_MIGRATE_QUEUE_COUNT         200
 
-- 
1.8.3.1