From nobody Mon Mar 18 22:42:26 2024 X-Original-To: dev-commits-src-all@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 4Tz8xZ2vbFz5F903; Mon, 18 Mar 2024 22:42:26 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Tz8xZ2SP5z4cXW; Mon, 18 Mar 2024 22:42:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710801746; 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=wnExVjaVejBwC5UmdbP3T4wmC9gxs/Hw6svK2JykceA=; b=WhrJyELtP/zaDC5bbpcDt3qEBMC+6jwH02qbEQT47FdUrLyhzJ/mKp32+hXRh2BKTaSGqQ l/h+zxH5dZDw/H1p6MB1mdBk05QrzUeyBhIdQ8VKmV18PEkKxVgAh7myPQG+mkFpCruq0C aPXCV7J3OoulPVjiq7YAjWUmUmhQXxU34f7ElCZqKX7DkQ4uXSHzlzmu4vxW0EyNlQLjT8 T+lt5yRRYgqTzU9kqltgApLBuWQp8VQESXEd0Ax8+BPwlp2WwiUTkGkaTHg6xYHzte0/pM 2yGNNElKbl7ylymAU5MgdQJyGWGft5ZhICJeMuK55UPbqGhbLWcS91/Yj61Fpg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710801746; a=rsa-sha256; cv=none; b=drHbWM1nNkZOnrNlGHj1En9H1UtRRcXsU2l0rN/3Qq8hBM4Ofny2gQte4BXG+V+u/EkY6A STwiUyk/ZoKijj06QIEXwPFxTbTzsAsL5g+uz7eW22pMRTB14JqNS1SYJe0rPZ7tNPdRLc YrrxXZKAY01LLe14tzlAkcPCHC4hCw3t0nLpR2IArAgjVGtZZ7ay+DWfSnJCW8RnIW4HcB vu5E6l/1ExNOh6WXl2srs3j826Mmq3wBHq8EX6ZsS3jiFmzGCKgifS1N2BHNaO5DNcfbCU Ea+eqjiYlhv8QthN/lokZgzN6vQVqjtfjQGBDga3qXb+qljmat7fIhGdeycs1w== 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=1710801746; 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=wnExVjaVejBwC5UmdbP3T4wmC9gxs/Hw6svK2JykceA=; b=S826JafNdYr0BTlFYOfKUH7HVfK4bg8KxD0nEi+bwJFfzvSjSnH+bCbt7IUOY+v+Cy62rh /VWNZOC1mboDpniC39Dvz53Ke99R5fscegC6JyDnua3aSucYI23nueZuXj+3r3uhx7crhC X3wwU8f4VKRQnNbXEZ2/k5XPnJav2yPqRZk9ZSMtvraWUk7Ylagto/goU62WJ+mLZspPJp LDsgLJh4tIXEyX7WJ/lkWERj/OtDfgJey2ZuSwhEBozqQ6emdS74IaDm3SVLuRFrUZ9+S9 ktyraGmmlQxdPCssyNjCaSworMQMSwH6KewIX5TbbRCM1akWvIz5R9M3yX0VoA== 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 4Tz8xZ24KJzjBj; Mon, 18 Mar 2024 22:42:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42IMgQJE094217; Mon, 18 Mar 2024 22:42:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42IMgQ47094214; Mon, 18 Mar 2024 22:42:26 GMT (envelope-from git) Date: Mon, 18 Mar 2024 22:42:26 GMT Message-Id: <202403182242.42IMgQ47094214@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: 8f13abb4fd2f - main - nfsd.8: Document ways to minimize Copy operation times List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 8f13abb4fd2f3c5d25bde830607a4aec6cec42d9 Auto-Submitted: auto-generated The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=8f13abb4fd2f3c5d25bde830607a4aec6cec42d9 commit 8f13abb4fd2f3c5d25bde830607a4aec6cec42d9 Author: Rick Macklem AuthorDate: 2024-03-18 22:40:41 +0000 Commit: Rick Macklem CommitDate: 2024-03-18 22:40:41 +0000 nfsd.8: Document ways to minimize Copy operation times For NFSv4.2, a Copy operation can take a long time to complete. If there is a concurrent ExchangeID or DelegReturn operation which requires the exclusive lock on all NFSv4 state, this can result in a stall of the nfsd server. This patch documents ways to avoid this problem. This is a content change. Reviewed by: karels, wollman, pauamma_gundo.com (manpages) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D44395 --- usr.sbin/nfsd/nfsd.8 | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/usr.sbin/nfsd/nfsd.8 b/usr.sbin/nfsd/nfsd.8 index df73661169df..9051df4bcb31 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 March 22, 2023 +.Dd March 16, 2024 .Dt NFSD 8 .Os .Sh NAME @@ -353,3 +353,25 @@ to be set to one on the MDS as a workaround. Linux 5.n kernels appear to have been patched such that this .Xr sysctl 8 does not need to be set. +.Pp +For NFSv4.2, a Copy operation can take a long time to complete. +If there is a concurrent ExchangeID or DelegReturn operation +which requires the exclusive lock on all NFSv4 state, this can +result in a +.Dq stall +of the +.Nm +server. +If your storage is on ZFS without block cloning enabled, +setting the +.Xr sysctl 8 +.Va vfs.zfs.dmu_offset_next_sync +to 0 can often avoid this problem. +It is also possible to set the +.Xr sysctl 8 +.Va vfs.nfsd.maxcopyrange +to 10-100 megabytes to try and reduce Copy operation times. +As a last resort, setting +.Xr sysctl 8 +.Va vfs.nfsd.maxcopyrange +to 0 disables the Copy operation.