From 260e817b8a652ddb705808098da1e07e3660f4c7 Mon Sep 17 00:00:00 2001 From: Santosh Kumar Pradhan Date: Tue, 14 Jan 2014 11:21:44 +0530 Subject: gNFS: Set default outstanding RPC limit to 16 With 64, NFS server hangs with large I/O load (~ 64 threads writing to NFS server). The test results from Ben England (Performance expert) suggest to set it as 16 instead of 64. Change-Id: I418ff5ba0a3e9fdb14f395b8736438ee1bbd95f4 BUG: 1008301 Signed-off-by: Santosh Kumar Pradhan Reviewed-on: http://review.gluster.org/6696 Tested-by: Gluster Build System Reviewed-by: ben england --- xlators/protocol/server/src/server.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'xlators/protocol') diff --git a/xlators/protocol/server/src/server.c b/xlators/protocol/server/src/server.c index 56b83cb9a..378aa393a 100644 --- a/xlators/protocol/server/src/server.c +++ b/xlators/protocol/server/src/server.c @@ -746,7 +746,15 @@ reconfigure (xlator_t *this, dict_t *options) (void) rpcsvc_set_allow_insecure (rpc_conf, options); (void) rpcsvc_set_root_squash (rpc_conf, options); - (void) rpcsvc_set_outstanding_rpc_limit (rpc_conf, options); + + ret = rpcsvc_set_outstanding_rpc_limit (rpc_conf, options, + RPCSVC_DEFAULT_OUTSTANDING_RPC_LIMIT); + if (ret < 0) { + gf_log (this->name, GF_LOG_ERROR, + "Failed to reconfigure outstanding-rpc-limit"); + goto out; + } + list_for_each_entry (listeners, &(rpc_conf->listeners), list) { if (listeners->trans != NULL) { if (listeners->trans->reconfigure ) @@ -860,12 +868,20 @@ init (xlator_t *this) /* RPC related */ conf->rpc = rpcsvc_init (this, this->ctx, this->options, 0); if (conf->rpc == NULL) { - gf_log (this->name, GF_LOG_WARNING, + gf_log (this->name, GF_LOG_ERROR, "creation of rpcsvc failed"); ret = -1; goto out; } + ret = rpcsvc_set_outstanding_rpc_limit (conf->rpc, this->options, + RPCSVC_DEFAULT_OUTSTANDING_RPC_LIMIT); + if (ret < 0) { + gf_log (this->name, GF_LOG_ERROR, + "Failed to configure outstanding-rpc-limit"); + goto out; + } + ret = rpcsvc_create_listeners (conf->rpc, this->options, this->name); if (ret < 1) { -- cgit