diff options
| author | Anand Avati <avati@redhat.com> | 2013-09-12 08:16:40 -0700 |
|---|---|---|
| committer | Anand Avati <avati@redhat.com> | 2013-09-19 14:06:33 -0700 |
| commit | 0af0e6405d6911cf41d1ad1d4504baa842c1328e (patch) | |
| tree | a0a7f94d1949b524f7571ff99562673a7a63404d /rpc/rpc-lib/src/rpcsvc.h | |
| parent | 56e8bc6464d14ceaa42649dea1f5a4abef064668 (diff) | |
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 <avati@redhat.com>
BUG: 953694
Reviewed-on: http://review.gluster.org/5927
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-on: http://review.gluster.org/5928
Diffstat (limited to 'rpc/rpc-lib/src/rpcsvc.h')
| -rw-r--r-- | rpc/rpc-lib/src/rpcsvc.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/rpc/rpc-lib/src/rpcsvc.h b/rpc/rpc-lib/src/rpcsvc.h index 1323c8b7aee..4bb59a82563 100644 --- a/rpc/rpc-lib/src/rpcsvc.h +++ b/rpc/rpc-lib/src/rpcsvc.h @@ -178,7 +178,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; |
