From nobody Mon Mar 10 13:37:00 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ZBHxT3cCWz5qtNT; Mon, 10 Mar 2025 13:37:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZBHxT0mS8z44Vp; Mon, 10 Mar 2025 13:37:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1741613821; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7GaLF8hv23VTYyqnTP0C8GsoruEGHYQMY4X7JlSyB34=; b=RcjWX9N6JP9eWHyTN/jk7PKNGOdtpt77VOsUFoB4a8/ZmUPo7+ssPWiM/lmrmWqZv4kg5q 02zP74B94seEkBD2njQP6XfpsoxDy7QOkLRutvI8YKlirCP0iAfX40mVIWkpUaCNEbE29l 8zVq5bCtiPDllTBuUPPddog1MykinxdPRPkkPHq3+ZsoI46lRrXUPIQV5kVAblkZmUzZeo JTyd1YGKTVFqPtBHD2Ab2R0HO7AKHbtgDlzFiwvasyH3e5jyvz/tdZnMzWsMNCTDfhXmwZ h+jzbjCQ2j8eSIrnrv51nQIUyTh7yWXrx+WXZZ+3wgGq+6voVmwDO5u8VSLMEw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1741613821; a=rsa-sha256; cv=none; b=h3OVALhqgQDmo5EOeY+za+E0cKHeVsazeQzpZeacMBwZn744wIL3VhVIOVjJjSHvSCalJL 9/W/G2aL81Q/HoD2AtbuFdpYaqsTVSVy048ZO1hEgUqR4SeN8xk2Wj4HKA2oltMwVSxDcK +z28URacR9byZ1hhdltqo5l075+Fk+CgjIJzgxkhG9tm2LWcZyotYNhQMb939mj3Els9uY JUDemFn07heNICG3VXVEjFQMKqH7YCiOcGYSfJ0k1JhdHiZ36+toaMSeghGuTpkEBb+ylB pslJSdfcaWBShUSMRwdZxTcd3y+ORu4JzwBu7yA1691KYadAbhicgvz6kQzmKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1741613821; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7GaLF8hv23VTYyqnTP0C8GsoruEGHYQMY4X7JlSyB34=; b=RpURfNbFolu0ZKArpjJJxxXCRv6RKaqG/3zRHkua9I5Q/jL/itYbwIaXLjc3/owrf2SJhc hkC44YnBY+ebqbiGlQWoXWLI8frxR4XZrlsTao4g0fKtMXTcdPAjucki8wKlt/kt4ZIAFS QL0k5/e+IyGJNFCJpVQ7IE3Y5SrkN8Bc0pPppcum3wNK2/VQi+WR5fwnypm8wjsRsqPo5Y MZaJqxyc91z1HQc7XFkZ9Qnbv0H51HhUfiHCo1mlxEueJBf8xyqLjeoXQAjzedzNvuCXfL 8gBOK4qiOQtRpO91yJ5/6mDPkvya6ZV9xwsOg4VBCmM4P/90HXTvL7JFlXDVMw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZBHxS71B3zjCd; Mon, 10 Mar 2025 13:37:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 52ADb0ak078654; Mon, 10 Mar 2025 13:37:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52ADb0nx078651; Mon, 10 Mar 2025 13:37:00 GMT (envelope-from git) Date: Mon, 10 Mar 2025 13:37:00 GMT Message-Id: <202503101337.52ADb0nx078651@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: f27afbd85002 - main - nfsd.8: Note that the -n option is deprecated List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f27afbd850021b9cb7cf4e66f0621c793ad37de0 Auto-Submitted: auto-generated The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=f27afbd850021b9cb7cf4e66f0621c793ad37de0 commit f27afbd850021b9cb7cf4e66f0621c793ad37de0 Author: Rick Macklem AuthorDate: 2025-03-10 13:35:23 +0000 Commit: Rick Macklem 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