The vfs.nfsd.maxthreads sysctl should control the maximum number of threads that the nfs server creates. Indeed it does, for nfs servers that are already running. But when nfsd starts up, it ignores this setting. Instead, it overwrites it based on the value of the --maxthreads argument or else it somehow chooses a sensible default. This behavior is unfortunate, since /etc/rc.d/sysctl runs before /etc/rc.d/nfsd. That means you can't use the sysctl to control nfsd's behavior. Should nfsd check the sysctl if maxthreads is unset, and use that value? Steps to Reproduce ================== # echo vfs.nfsd.maxthreads=128 >> /etc/sysctl.conf # service sysctl restart # sysctl vfs.nfsd.maxthreads vfs.nfsd.maxthreads: 128 # service nfsd start # sysctl vfs.nfsd.maxthreads vfs.nfsd.maxthreads: 64
I think this should be discussed on a mailing list and not here in a PR. Please post to whichever list you think is most appropriate and I will respond there.