summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt
diff options
context:
space:
mode:
authorVijaikumar M <vmallika@redhat.com>2014-09-02 17:43:43 +0530
committerVijay Bellur <vbellur@redhat.com>2014-09-23 03:14:54 -0700
commit07235e99003693687e349f74d5627bd8c53ff1e0 (patch)
tree9780e17e889168bd5056f113d351ed91169ba171 /xlators/mgmt
parent40dcfefb73e3e00e7cbd22a44c3bd795612f356a (diff)
glusterd: Set the rlimit for Open FDs to higher value.
Default 'open FD limit' is 1024. As the number of volumes/bricks increases, brick-to-glusterd socket FDs also increases in glusterd and runs out of the limit. Solution is to set the 'Open FD' limit to higher value in glusterd Change-Id: Iaa60b2155df2fa5a0759e054bdebffbc09f63ec1 BUG: 1145095 Signed-off-by: Vijaikumar M <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/8578 Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com> Signed-off-by: Sachin Pandit <spandit@redhat.com> Reviewed-on: http://review.gluster.org/8807
Diffstat (limited to 'xlators/mgmt')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd.c b/xlators/mgmt/glusterd/src/glusterd.c
index f4ead6115e3..b9a43cd32ce 100644
--- a/xlators/mgmt/glusterd/src/glusterd.c
+++ b/xlators/mgmt/glusterd/src/glusterd.c
@@ -1198,6 +1198,24 @@ init (xlator_t *this)
int i = 0;
char *valgrind_str = NULL;
+#ifndef GF_DARWIN_HOST_OS
+ {
+ struct rlimit lim;
+ lim.rlim_cur = 65536;
+ lim.rlim_max = 65536;
+
+ if (setrlimit (RLIMIT_NOFILE, &lim) == -1) {
+ gf_log (this->name, GF_LOG_ERROR,
+ "Failed to set 'ulimit -n "
+ " 65536': %s", strerror(errno));
+ } else {
+ gf_log (this->name, GF_LOG_INFO,
+ "Maximum allowed open file descriptors "
+ "set to 65536");
+ }
+ }
+#endif
+
dir_data = dict_get (this->options, "working-directory");
if (!dir_data) {