From nobody Mon Apr 01 02:17:16 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 4V7F5S2hcbz5GxlT; Mon, 1 Apr 2024 02:17:16 +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 4V7F5S1tzdz4BsG; Mon, 1 Apr 2024 02:17:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711937836; 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=x0y1Rk67ZktnnbzUn/SdhCuMpvd1OfPhPLedj8bPc80=; b=I/v95hBAvZM3Me2vxn3kQbhTGj7S/d8EE41t8dGL3Wj8nouKzOY/x1x7orUvgzUK51gQNR M6GL7QE1+8FMTZUrlvdNtpoioyJB2bz3+5Bbtbx8jvSJT0JRCEAted/PHFpoeNyz3o6LSB W1hJDHEGJ52/TbkQ9/oNH5olLwTbV4fbiewMishxmPhvg9AVj57XZmy8f8wETF1zB7GiJC +02yukxwSvtylGQAxofaF3PvowlZxjrCVivGP+m4bvRd7P+sXCuWPxAJ+lW5LiDa3JB25L D3qbCyodsoiDjisN+zz5kFQlnTjQA5vE0InzTCLW3jZbNBun8Tp8dw9zoWYFkg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711937836; a=rsa-sha256; cv=none; b=S8jFdvUKu18656JOJtUyCTBavXK5al9sjx3kOEAaV/MP/3LnHbGlsxsKAzCXA1uchwimRs V84vLL6baMa657G0ARDvIpJhsat3Aq6kbWHZLLv8k9ZlWndxqEix+FPS9pdNaLiFf1QKip eVilB2i4m3dDACz4Wau4Tdvn0HQuGWRkrMCABGIdW8eHlMfwZAAdv6dIoQHC+NLNUNSBXk 6xMtuuIqzDpmYKhoOGnL6QIbVeRyYryji9NggnL/paOn7m4vICvTaPElLYndOlpVFM7bXO Sc1tHMPv4+4SZssbbZnMl5E0XOACK04wD5k7K7abLeBHa7GgDErhbqDr5yEu0w== 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=1711937836; 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=x0y1Rk67ZktnnbzUn/SdhCuMpvd1OfPhPLedj8bPc80=; b=kstxErgzP8hQVKqTSmmCZFqRBA5KRwOPLU96A54yRTHZD6KsQt/8t7FnCxUlGch3FSeUJf F8qnIytMcSvUYSkVhzLRSI7TX74XWvZIQCy2EStvcKsbeblfJ4fzTFrOmw0X31gpn/z+OR 16CCYMm/BW3Tw51PJZTLjWLDISsc/+tWyHdrwj9qIcPlao+3PupI5QUns4KoL/aep9P9l5 eoD9MbZIt35aETcX9qi+HLns1Hm/3UpWodYCxWPytSAkN/5P0mAA7dSY2Nrje0GPlAuJl8 iXBLkRqnYbaAmgV5LhMG313HnGcQ1oVvmxKL2r1Kg9NMkibkXRhSBv12s7niBA== 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 4V7F5S1VlKz12pV; Mon, 1 Apr 2024 02:17:16 +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 4312HGe3093509; Mon, 1 Apr 2024 02:17:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4312HGRp093506; Mon, 1 Apr 2024 02:17:16 GMT (envelope-from git) Date: Mon, 1 Apr 2024 02:17:16 GMT Message-Id: <202404010217.4312HGRp093506@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: 23a48a469a4e - stable/13 - 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 23a48a469a4e6ce7b69620084513a7bf9b0fb939 Auto-Submitted: auto-generated The branch stable/13 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=23a48a469a4e6ce7b69620084513a7bf9b0fb939 commit 23a48a469a4e6ce7b69620084513a7bf9b0fb939 Author: Rick Macklem AuthorDate: 2024-03-18 22:40:41 +0000 Commit: Rick Macklem CommitDate: 2024-04-01 02:16:36 +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. (cherry picked from commit 8f13abb4fd2f3c5d25bde830607a4aec6cec42d9) --- 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 0a9f6f82c85f..1c04bad3a042 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 22, 2023 +.Dd March 16, 2024 .Dt NFSD 8 .Os .Sh NAME @@ -355,3 +355,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.