git: f03c8869127c - stable/14 - nfsd.8: Note that the -n option is deprecated
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 25 Mar 2025 21:36:58 UTC
The branch stable/14 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=f03c8869127c84cccec468ab4bf2ea5caf3cfade commit f03c8869127c84cccec468ab4bf2ea5caf3cfade Author: Rick Macklem <rmacklem@FreeBSD.org> AuthorDate: 2025-03-10 13:35:23 +0000 Commit: Rick Macklem <rmacklem@FreeBSD.org> CommitDate: 2025-03-25 21:35:53 +0000 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 f27afbd850021b9cb7cf4e66f0621c793ad37de0) --- usr.sbin/nfsd/nfsd.8 | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/usr.sbin/nfsd/nfsd.8 b/usr.sbin/nfsd/nfsd.8 index 1c04bad3a042..46478f978f21 100644 --- a/usr.sbin/nfsd/nfsd.8 +++ b/usr.sbin/nfsd/nfsd.8 @@ -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