From a4056292528db49a666422c7f8e0c032441cc83f Mon Sep 17 00:00:00 2001 From: Anand Avati Date: Sun, 20 Oct 2013 08:45:18 -0700 Subject: rpcsvc: implement per-client RPC throttling Implement a limit on the total number of outstanding RPC requests from a given cient. Once the limit is reached the client socket is removed from POLL-IN event polling. Change-Id: I8071b8c89b78d02e830e6af5a540308199d6bdcd BUG: 1008301 Signed-off-by: Anand Avati Reviewed-on: http://review.gluster.org/6114 Reviewed-by: Santosh Pradhan Reviewed-by: Rajesh Joseph Reviewed-by: Harshavardhana Reviewed-by: Vijay Bellur Tested-by: Gluster Build System --- xlators/nfs/server/src/nfs.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'xlators/nfs/server/src') diff --git a/xlators/nfs/server/src/nfs.c b/xlators/nfs/server/src/nfs.c index 8158f954f..33bd36e74 100644 --- a/xlators/nfs/server/src/nfs.c +++ b/xlators/nfs/server/src/nfs.c @@ -1359,6 +1359,15 @@ struct volume_options options[] = { "portmap service. Use this option to turn off portmap " "registration for Gluster NFS. On by default" }, + { .key = {"rpc.outstanding-rpc-limit"}, + .type = GF_OPTION_TYPE_INT, + .min = 0, + .max = RPCSVC_MAX_OUTSTANDING_RPC_LIMIT, + .default_value = TOSTRING(RPCSVC_DEFAULT_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)" + }, { .key = {"nfs.port"}, .type = GF_OPTION_TYPE_INT, .min = 1, -- cgit