From 5ab18374d07c57de5647682d51afa05101be356f Mon Sep 17 00:00:00 2001 From: Anand Avati Date: Thu, 12 Sep 2013 08:16:40 -0700 Subject: rpcsvc: allocate large auxgid list on demand For rpc requests having large aux group list, allocate large list on demand. Else use small static array by default. Without this patch, glusterfsd allocates 140+MB of resident memory just to get started and initialized. Change-Id: I3a07212b0076079cff67cdde18926e8f3b196258 Signed-off-by: Anand Avati BUG: 953694 Reviewed-on: http://review.gluster.org/5927 Tested-by: Gluster Build System Reviewed-by: Amar Tumballi --- rpc/rpc-lib/src/rpcsvc.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'rpc/rpc-lib/src/rpcsvc.h') diff --git a/rpc/rpc-lib/src/rpcsvc.h b/rpc/rpc-lib/src/rpcsvc.h index 67ff74be6..a08ee4b57 100644 --- a/rpc/rpc-lib/src/rpcsvc.h +++ b/rpc/rpc-lib/src/rpcsvc.h @@ -181,7 +181,9 @@ struct rpcsvc_request { /* Might want to move this to AUTH_UNIX specific state since this array * is not available for every authentication scheme. */ - gid_t auxgids[GF_MAX_AUX_GROUPS]; + gid_t *auxgids; + gid_t auxgidsmall[SMALL_GROUP_COUNT]; + gid_t *auxgidlarge; int auxgidcount; -- cgit