Bug#933510: nfs-kernel-server: nproc manpage description confuses me
Package: nfs-kernel-server
Version: 1:1.3.4-2.5
Severity: minor
File: /usr/share/man/man8/rpc.nfsd.8.gz
The manpage says:
> nproc
>
> specify the number of NFS server threads.
> By default, just one thread is started.
> However, for optimum performance several threads should be used.
> The actual figure depends on the number of and the work load created by the NFS clients, but
> a useful starting point is 8 threads.
>
> Effects of modifying that number can be checked using the nfsstat(8) program.
The "just one thread" confused me, because it sounds (to me) like it's saying "nproc is 1 by default".
But this is clearly false - nproc is 8 by default in all of these places:
https://sources.debian.org/src/nfs-utils/1:1.3.4-2.5/utils/nfsd/nfsd.c/#L32
https://sources.debian.org/src/nfs-utils/1:1.3.4-2.5/debian/nfs-utils_env.sh/#L12
https://sources.debian.org/src/nfs-utils/1:1.3.4-2.5/debian/nfs-kernel-server.default/#L2
I now think nproc is the *MAXIMUM* number of knfsd kernel threads, and that
the "by default" line is really just saying that Linux will start one knfsd up-front, and
start and stop additional knfsd kernel threads on-demand as NFS client load grows/shrinks.
If my current understanding is correct, I suggest the following wording:
nproc
the maximum number of NFS server kernel threads.
A single thread is started immediately.
Additional threads are started/stopped automatically as demand grows/shrinks.
The optimal nproc depends on both the number and workload of NFS clients.
The default is 8, which is a good first guess.
Do not set nproc to 1, as that will (usually? always?) be slow.
Use nfsstat(8) to determine optimal nproc for your site.
Reply to: