From nobody Tue Mar 25 21:36:58 2025 X-Original-To: dev-commits-src-branches@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 4ZMjtM0QSSz5rqKW; Tue, 25 Mar 2025 21:36:59 +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 4ZMjtL37yVz3pyS; Tue, 25 Mar 2025 21:36:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742938618; 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=VkNvNsRJ7fDDt6cGjBipCjJtjUvOydhz1puS6WQJ+kk=; b=vLfPfvMI8Zwb94NJ8Msq3x3NTiA7PCiH06kHftXjJo6eVL5k9zdthAkDBdvgj0U3U97aMX MwAaojdddmi3WZI4HnSqEgGo73LsAIzSifIeLOQRLcEN2nFOciw7o1CjhvRVTMmrp4axnP TBoSi6W28EDPQLUNGB5uyt9VVMwKxw5DFR7vk5m1hGa33RrLP64GQXqI/hR0c/Jlip4zPJ W2X7nJANjJ/t/KtkW6cVibN6XCy81z6YY7LuNok3+NbpOjmQCnmwNUuQpJwa/ijxUgjgzp fRlNLLjfE9eY+JDLjHzdEbBo8VJF24SU04BltTZeDbuN0Vu4j2l8UW165tWqGQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742938618; a=rsa-sha256; cv=none; b=FWx1dLnCS2twORgMbBFMoMHab47rKWWCXj07tGD5QV8acLGwarY61c1QXdzXWBwaGoSOEn 1Y3KOZ0OoTeMYTFTVkf6sWFQVpg47Rm2H6kOLSeN5oJdH3AajjHt91muwfSAEZOL6C4EVv /AORhqBhn2N3HBwz63v0QexDcGul5CAhDhzv9UFaNE/NyCkphi0si+QtHIQ187Z7MN5NUV v6L953eWidHVbAV85RgjMImNvsJkTFB3S+Lo1Qdld9ppmzDTVB1fVl79UPPmoA7Jy+p7yX FAuu9etU2J3NPw6R0IBbKlEOisfQeNCxcfwjwoNv0fbLWZCoLgDGXzlzIpIZ0A== 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=1742938618; 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=VkNvNsRJ7fDDt6cGjBipCjJtjUvOydhz1puS6WQJ+kk=; b=Cp0RHBeRla71AQPatXPEwpVTRMcCUBaUovDvM4uhFtPW9SK+1b89/AXISXBMEnNZCUcrX2 igdJrCKl+aDNeSacv9ksTxG6VX4nXqCO38h169C38b+9XytJAE0tNojgjhW+uADYDNUBpo ywS1SQ7bU+YTOHOo3O+XeuAM+FuAXC6kL7BFU3zCu++slR5IdvhdYx55kShtwCNEznMDlQ K0Z6Mvc7gIp5DXhjazcAUeLiNETPcyOGWiCxW3SA123heqLzkkIDQ0lNdopOnmUWzuh/A4 zqxMXRSQEeVWaGfyqgSJ+HTZnqCzCXb8MjCetstshmGwIdwHsW4PXqpGmdE9oQ== 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 4ZMjtL29c0zyBD; Tue, 25 Mar 2025 21:36:58 +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 52PLaw8G014920; Tue, 25 Mar 2025 21:36:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52PLawKv014917; Tue, 25 Mar 2025 21:36:58 GMT (envelope-from git) Date: Tue, 25 Mar 2025 21:36:58 GMT Message-Id: <202503252136.52PLawKv014917@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: f03c8869127c - stable/14 - nfsd.8: Note that the -n option is deprecated List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: f03c8869127c84cccec468ab4bf2ea5caf3cfade Auto-Submitted: auto-generated The branch stable/14 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=f03c8869127c84cccec468ab4bf2ea5caf3cfade commit f03c8869127c84cccec468ab4bf2ea5caf3cfade Author: Rick Macklem AuthorDate: 2025-03-10 13:35:23 +0000 Commit: Rick Macklem 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