Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.kernel > #64615 > unrolled thread

Bug#933510: nfs-kernel-server: nproc manpage description confuses me

Started by"Trent W. Buck" <trentbuck@gmail.com>
First post2019-07-31 04:10 +0200
Last post2019-07-31 04:10 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.debian.kernel


Contents

  Bug#933510: nfs-kernel-server: nproc manpage description confuses me "Trent W. Buck" <trentbuck@gmail.com> - 2019-07-31 04:10 +0200

#64615 — Bug#933510: nfs-kernel-server: nproc manpage description confuses me

From"Trent W. Buck" <trentbuck@gmail.com>
Date2019-07-31 04:10 +0200
SubjectBug#933510: nfs-kernel-server: nproc manpage description confuses me
Message-ID<ypMdX-3s2-3@gated-at.bofh.it>
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.

[toc] | [standalone]


Back to top | Article view | linux.debian.kernel


csiph-web