git: f27afbd85002 - main - nfsd.8: Note that the -n option is deprecated
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 10 Mar 2025 13:37:00 UTC
The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=f27afbd850021b9cb7cf4e66f0621c793ad37de0 commit f27afbd850021b9cb7cf4e66f0621c793ad37de0 Author: Rick Macklem <rmacklem@FreeBSD.org> AuthorDate: 2025-03-10 13:35:23 +0000 Commit: Rick Macklem <rmacklem@FreeBSD.org> CommitDate: 2025-03-10 13:35:23 +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 Reviewed by: 0mp (manpages) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D49102 --- 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 10aba5c8d845..992228fba752 100644 --- a/usr.sbin/nfsd/nfsd.8 +++ b/usr.sbin/nfsd/nfsd.8 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd July 5, 2024 +.Dd February 21, 2025 .Dt NFSD 8 .Os .Sh NAME @@ -88,13 +88,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 @@ -223,12 +230,15 @@ to execute in the foreground instead of in daemon mode. .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