increasing MAXNFSDCNT

Graham Allan allan at physics.umn.edu
Mon Jul 6 21:29:58 UTC 2015


On Mon, Jul 06, 2015 at 04:46:15PM -0400, Rick Macklem wrote:
> Graham Allan wrote:
> > Regarding the maximum number of nfs server threads, is increasing the
> > "#define MAXNFSDCNT 256" in nfsd.c the only thing needed to try higher
> > values?
> > 
> Oops, my turn to admit that I should have read the man page before answering.
> If you have a fairly recent nfsd that supports the "-maxthreads" option, you
> can set this and I'm pretty sure you can make it larger than 256.
> The system actually dynamically adjusts the # of nfsd kernel threads between
> "-minthreads" and "-maxthreads". The "-n" option (which should probably be deprecated)
> sets both of these to the same value and is limited to MAXNFSDCNT (256).
> 
> If your nfsd doesn't support "-maxthreads", increasing MAXNFSDCNT should work.

Would have helped if I stated the version too - I'm using 9.3 so it
just supports "-n" (I can see "-minthreads" and "-maxthreads" in the 10.1 man
pages).

I guess I'm a bit cautious about increasing it though, since I expect it's possible
I might rebuild a new patch release without remembering to re-edit
nfsd.c. If that were the case and I'd specified "-n" > MAXNFSDCNT then
this version of nfsd would revert back to DEFNFSDCNT = 4, which could be a painful
shot in the foot.

Thanks,

Graham


More information about the freebsd-fs mailing list