|
|
d1681e |
From 20a92ebcfcf534390468fadca97e7fdc0207967c Mon Sep 17 00:00:00 2001
|
|
|
d1681e |
From: Poornima G <pgurusid@redhat.com>
|
|
|
d1681e |
Date: Wed, 25 Oct 2017 17:00:36 +0530
|
|
|
d1681e |
Subject: [PATCH 131/139] readdir-ahead: Add parallel-readdir option in
|
|
|
d1681e |
readdir-ahead
|
|
|
d1681e |
|
|
|
d1681e |
parallel-readdir option is defined as belonging to readdir-ahead
|
|
|
d1681e |
in glusterd-volume-set.c, but was not defined in options of
|
|
|
d1681e |
readdir-ahead, fixing the same.
|
|
|
d1681e |
|
|
|
d1681e |
> Reviewed on: https://review.gluster.org/#/c/18572/
|
|
|
d1681e |
> Change-Id: I97cc88b38ab99ade5f066519ca1cb9bfed03a7da
|
|
|
d1681e |
> BUG: 1506197
|
|
|
d1681e |
> Signed-off-by: Poornima G <pgurusid@redhat.com>
|
|
|
d1681e |
> (cherry picked from commit 80a6a2357c0c0351691c450c40de820efce7ff6f)
|
|
|
d1681e |
|
|
|
d1681e |
Change-Id: I97cc88b38ab99ade5f066519ca1cb9bfed03a7da
|
|
|
d1681e |
BUG: 1463592
|
|
|
d1681e |
Signed-off-by: Poornima G <pgurusid@redhat.com>
|
|
|
d1681e |
Reviewed-on: https://code.engineering.redhat.com/gerrit/128484
|
|
|
d1681e |
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
|
d1681e |
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
|
|
d1681e |
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
|
|
|
d1681e |
---
|
|
|
d1681e |
xlators/performance/readdir-ahead/src/readdir-ahead.c | 13 +++++++++++++
|
|
|
d1681e |
xlators/performance/readdir-ahead/src/readdir-ahead.h | 1 +
|
|
|
d1681e |
2 files changed, 14 insertions(+)
|
|
|
d1681e |
|
|
|
d1681e |
diff --git a/xlators/performance/readdir-ahead/src/readdir-ahead.c b/xlators/performance/readdir-ahead/src/readdir-ahead.c
|
|
|
d1681e |
index 8827b8b..c2ceda4 100644
|
|
|
d1681e |
--- a/xlators/performance/readdir-ahead/src/readdir-ahead.c
|
|
|
d1681e |
+++ b/xlators/performance/readdir-ahead/src/readdir-ahead.c
|
|
|
d1681e |
@@ -635,6 +635,8 @@ reconfigure(xlator_t *this, dict_t *options)
|
|
|
d1681e |
size_uint64, err);
|
|
|
d1681e |
GF_OPTION_RECONF("rda-cache-limit", priv->rda_cache_limit, options,
|
|
|
d1681e |
size_uint64, err);
|
|
|
d1681e |
+ GF_OPTION_RECONF("parallel-readdir", priv->parallel_readdir, options,
|
|
|
d1681e |
+ bool, err);
|
|
|
d1681e |
|
|
|
d1681e |
return 0;
|
|
|
d1681e |
err:
|
|
|
d1681e |
@@ -678,6 +680,8 @@ init(xlator_t *this)
|
|
|
d1681e |
err);
|
|
|
d1681e |
GF_OPTION_INIT("rda-cache-limit", priv->rda_cache_limit, size_uint64,
|
|
|
d1681e |
err);
|
|
|
d1681e |
+ GF_OPTION_INIT("parallel-readdir", priv->parallel_readdir, bool,
|
|
|
d1681e |
+ err);
|
|
|
d1681e |
|
|
|
d1681e |
return 0;
|
|
|
d1681e |
|
|
|
d1681e |
@@ -745,6 +749,15 @@ struct volume_options options[] = {
|
|
|
d1681e |
"value, irrespective of the number/size of "
|
|
|
d1681e |
"directories cached",
|
|
|
d1681e |
},
|
|
|
d1681e |
+ { .key = {"parallel-readdir"},
|
|
|
d1681e |
+ .type = GF_OPTION_TYPE_BOOL,
|
|
|
d1681e |
+ .default_value = "off",
|
|
|
d1681e |
+ .description = "If this option is enabled, the readdir operation "
|
|
|
d1681e |
+ "is performed in parallel on all the bricks, thus "
|
|
|
d1681e |
+ "improving the performance of readdir. Note that "
|
|
|
d1681e |
+ "the performance improvement is higher in large "
|
|
|
d1681e |
+ "clusters"
|
|
|
d1681e |
+ },
|
|
|
d1681e |
{ .key = {NULL} },
|
|
|
d1681e |
};
|
|
|
d1681e |
|
|
|
d1681e |
diff --git a/xlators/performance/readdir-ahead/src/readdir-ahead.h b/xlators/performance/readdir-ahead/src/readdir-ahead.h
|
|
|
d1681e |
index 8c663e0..36d4df8 100644
|
|
|
d1681e |
--- a/xlators/performance/readdir-ahead/src/readdir-ahead.h
|
|
|
d1681e |
+++ b/xlators/performance/readdir-ahead/src/readdir-ahead.h
|
|
|
d1681e |
@@ -45,6 +45,7 @@ struct rda_priv {
|
|
|
d1681e |
uint64_t rda_high_wmark;
|
|
|
d1681e |
uint64_t rda_cache_limit;
|
|
|
d1681e |
uint64_t rda_cache_size;
|
|
|
d1681e |
+ gf_boolean_t parallel_readdir;
|
|
|
d1681e |
};
|
|
|
d1681e |
|
|
|
d1681e |
#endif /* __READDIR_AHEAD_H */
|
|
|
d1681e |
--
|
|
|
d1681e |
1.8.3.1
|
|
|
d1681e |
|