diff options
author | Vijaikumar M <vmallika@redhat.com> | 2014-09-02 17:43:43 +0530 |
---|---|---|
committer | Krishnan Parthasarathi <kparthas@redhat.com> | 2014-09-03 02:37:24 -0700 |
commit | 60f33e6d12a854c425c2bbe237e0902a8e433631 (patch) | |
tree | 0f92b35b81634a6067d5b3a8065e0ac49ea989ae /xlators/mgmt/glusterd/src/glusterd.c | |
parent | b81cec326d4d43519593cb56b7a0e68ea5c3421c (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: 1136352
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>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd.c b/xlators/mgmt/glusterd/src/glusterd.c index b59353566a7..ab7ab3a2171 100644 --- a/xlators/mgmt/glusterd/src/glusterd.c +++ b/xlators/mgmt/glusterd/src/glusterd.c @@ -1161,6 +1161,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) { |