nfsd.8: Note that the -n option is deprecated

PR#284616 reported that --maxthreads did not
obey the 256 thread limit defined as MAXNFSDCNT in nfsd.c.

This is actually a feature and not a bug, since many NFS
servers will now want to run more than 256 threads and
--maxthreads can be used to set the upper bound on the
number of threads. (MAXNFSDCNT was used long ago to
define how many daemons would be forked, before daemons
were replaced by kernel threads.)

However, the nfsd.8 man page was misleading, since it
indicated that "-n" was the equivalent to setting both
--minthreads and --maxthreads to the same value.
This patch fixes the man page.

This is a content change.

PR:	284616

(cherry picked from commit f27afbd850)
This commit is contained in:
Rick Macklem committed 2025-03-25 14:35:53 -07:00
1 parent 0d61082e3c
commit f03c886912
1 file changed
+20 -10
+20 -10
View File
@@ -27,7 +27,7 @@
.\"
.\" @(#)nfsd.8 8.4 (Berkeley) 3/29/95
.\"
.Dd March 16, 2024
.Dd February 21, 2025
.Dt NFSD 8
.Os
.Sh NAME
@@ -90,13 +90,20 @@ without creating any servers.
Specifies a hostname to be used as a principal name, instead of
the default hostname.
.It Fl n Ar threads
Specifies how many servers to create.
This option is equivalent to specifying
This option is deprecated and is limited to a maximum of 256 threads.
The options
.Fl Fl maxthreads
and
.Fl Fl minthreads
with their respective arguments to
.Ar threads .
should now be used.
The
.Ar threads
argument for
.Fl Fl minthreads
and
.Fl Fl maxthreads
may be set to the same value to avoid dynamic
changes to the number of threads.
.It Fl Fl maxthreads Ar threads
Specifies the maximum servers that will be kept around to service requests.
.It Fl Fl minthreads Ar threads
@@ -221,12 +228,15 @@ Ignored; included for backward compatibility.
.El
.Pp
For example,
.Dq Li "nfsd -u -t -n 6"
serves UDP and TCP transports using six daemons.
.Dq Li "nfsd -u -t --minthreads 6 --maxthreads 6"
serves UDP and TCP transports using six kernel threads (servers).
.Pp
A server should run enough daemons to handle
the maximum level of concurrency from its clients,
typically four to six.
For a system dedicated to servicing NFS RPCs, the number of
threads (servers) should be sufficient to handle the peak
client RPC load.
For systems that perform other services, the number of
threads (servers) may need to be limited, so that resources
are available for these other services.
.Pp
The
.Nm