diff options
author | rmacklem <rmacklem@FreeBSD.org> | 2015-06-10 12:17:19 +0000 |
---|---|---|
committer | rmacklem <rmacklem@FreeBSD.org> | 2015-06-10 12:17:19 +0000 |
commit | 953b730dd8cd92f9264f9c355979c0c5f7b54291 (patch) | |
tree | ccc72ff29eec3fb41ec6bb7f053ff9406b7db6e5 /sys/fs/nfsserver/nfs_nfsdsocket.c | |
parent | bcf18ca2abe838198b7009aae0f14367abf7d1b3 (diff) | |
download | FreeBSD-src-953b730dd8cd92f9264f9c355979c0c5f7b54291.zip FreeBSD-src-953b730dd8cd92f9264f9c355979c0c5f7b54291.tar.gz |
MFC: r283635
Make the size of the hash tables used by the NFSv4 server tunable.
No appreciable change in performance was observed after increasing
the sizes of these tables and then testing with a single client.
However, there was an email that indicated high CPU overheads for
a heavily loaded NFSv4 and it is hoped that increasing the sizes
of the hash tables via these tunables might help.
The tables remain the same size by default.
Diffstat (limited to 'sys/fs/nfsserver/nfs_nfsdsocket.c')
-rw-r--r-- | sys/fs/nfsserver/nfs_nfsdsocket.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/fs/nfsserver/nfs_nfsdsocket.c b/sys/fs/nfsserver/nfs_nfsdsocket.c index b15dfec..9c00a0c 100644 --- a/sys/fs/nfsserver/nfs_nfsdsocket.c +++ b/sys/fs/nfsserver/nfs_nfsdsocket.c @@ -46,7 +46,8 @@ extern struct nfsrvfh nfs_pubfh, nfs_rootfh; extern int nfs_pubfhset, nfs_rootfhset; extern struct nfsv4lock nfsv4rootfs_lock; extern struct nfsrv_stablefirst nfsrv_stablefirst; -extern struct nfsclienthashhead nfsclienthash[NFSCLIENTHASHSIZE]; +extern struct nfsclienthashhead *nfsclienthash; +extern int nfsrv_clienthashsize; extern int nfsrc_floodlevel, nfsrc_tcpsavedreplies; extern int nfsd_debuglevel; NFSV4ROOTLOCKMUTEX; @@ -610,7 +611,7 @@ nfsrvd_compound(struct nfsrv_descript *nd, int isdgram, u_char *tag, */ if (nfsrv_stablefirst.nsf_flags & NFSNSF_EXPIREDCLIENT) { nfsrv_stablefirst.nsf_flags &= ~NFSNSF_EXPIREDCLIENT; - for (i = 0; i < NFSCLIENTHASHSIZE; i++) { + for (i = 0; i < nfsrv_clienthashsize; i++) { LIST_FOREACH_SAFE(clp, &nfsclienthash[i], lc_hash, nclp) { if (clp->lc_flags & LCL_EXPIREIT) { |