summaryrefslogtreecommitdiffstats
path: root/xlators/nfs
diff options
context:
space:
mode:
authorSantosh Kumar Pradhan <spradhan@redhat.com>2014-01-14 11:21:44 +0530
committerAnand Avati <avati@redhat.com>2014-01-15 13:47:32 -0800
commit260e817b8a652ddb705808098da1e07e3660f4c7 (patch)
treef8ff148afd4833bc074240ba4c5f47e6961d04d9 /xlators/nfs
parentf3e227d525ee04a3ea0196f7a15aa9b1a8f8cae1 (diff)
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 <spradhan@redhat.com> Reviewed-on: http://review.gluster.org/6696 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: ben england <bengland@redhat.com>
Diffstat (limited to 'xlators/nfs')
-rw-r--r--xlators/nfs/server/src/nfs.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/xlators/nfs/server/src/nfs.c b/xlators/nfs/server/src/nfs.c
index 4ab5cbc9077..04cf030dc12 100644
--- a/xlators/nfs/server/src/nfs.c
+++ b/xlators/nfs/server/src/nfs.c
@@ -967,6 +967,15 @@ nfs_init_state (xlator_t *this)
goto free_foppool;
}
+ ret = rpcsvc_set_outstanding_rpc_limit (nfs->rpcsvc,
+ this->options,
+ RPCSVC_DEF_NFS_OUTSTANDING_RPC_LIMIT);
+ if (ret < 0) {
+ gf_log (GF_NFS, GF_LOG_ERROR,
+ "Failed to configure outstanding-rpc-limit");
+ goto free_foppool;
+ }
+
nfs->register_portmap = rpcsvc_register_portmap_enabled (nfs->rpcsvc);
this->private = (void *)nfs;
@@ -1210,6 +1219,17 @@ reconfigure (xlator_t *this, dict_t *options)
"rpcsvc reconfigure options failed");
return (-1);
}
+
+ /* Reconfigure rpc.outstanding-rpc-limit */
+ ret = rpcsvc_set_outstanding_rpc_limit (nfs->rpcsvc,
+ options,
+ RPCSVC_DEF_NFS_OUTSTANDING_RPC_LIMIT);
+ if (ret < 0) {
+ gf_log (GF_NFS, GF_LOG_ERROR,
+ "Failed to reconfigure outstanding-rpc-limit");
+ return (-1);
+ }
+
regpmap = rpcsvc_register_portmap_enabled(nfs->rpcsvc);
if (nfs->register_portmap != regpmap) {
nfs->register_portmap = regpmap;
@@ -1741,7 +1761,7 @@ struct volume_options options[] = {
.type = GF_OPTION_TYPE_INT,
.min = RPCSVC_MIN_OUTSTANDING_RPC_LIMIT,
.max = RPCSVC_MAX_OUTSTANDING_RPC_LIMIT,
- .default_value = TOSTRING(RPCSVC_DEFAULT_OUTSTANDING_RPC_LIMIT),
+ .default_value = TOSTRING(RPCSVC_DEF_NFS_OUTSTANDING_RPC_LIMIT),
.description = "Parameter to throttle the number of incoming RPC "
"requests from a client. 0 means no limit (can "
"potentially run out of memory)"