From nobody Mon Apr 1 02:11:40 2024 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 4V7Dz131c8z5GxHQ; Mon, 1 Apr 2024 02:11:41 +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 4V7Dz05tq1z49VT; Mon, 1 Apr 2024 02:11:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711937500; 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=N38aq129gxwc9ngT595oPbzrsRZ0zJhGQOkGXSjU7oo=; b=JLN0cF831q7kMudNPjZRLz8WfM7cSkcC5s4xPMN0rw0vtUzatC5hJ8zpsf/vA29GcOdwEh Brl9bw7Dtbami0HobTpc6cxxNlxb/JPFaGdKyC8ykSYpCm2zS9yEQnfB3WEyW8w5eT46L1 sNpO6MukiVjcnqaq7Z7eeLqWHU8kUoasdFrRgnl7kZHthYkkNrTv0cAw0RaCIKdfD6LnR7 H8U0jzxh+QcVq0iWY4YnmJXJmLnKtiN19ZhKaGlDfsWIWpfZrCENfwlBnTcU32eXezacs/ g4ZcDUre/C48cpLWZy4qms7DBCzdctjIO2NvSQB9/sas2ekpetdtfhVt57yWHA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711937500; a=rsa-sha256; cv=none; b=I9YwR0ELLjr9hv1RkUp6giCLhJm1LkF2qtYcES9jkvDxx5MYerIHGg2zqfDKzGR+5mGSvL 88ceF2hbD2KQi3bk5QxaUPSEOTjQIhX/gEnXmsYaSfQ8ZhA1lgJbKoWHn0dAE6TvXY93su L86kUX3DSTYTex2BloxZFiAk7PP2U4VCayiwGJviBZYGJMMeMF8d7ak1Z85dt0/9v/dY0a mxzu17YjjTXRuzAD/QgRqCHtfrlo3V2n3i+z6yPUJDStcLlyTRVS9z0d8dZOOWALrOHhU2 Uy741d0ODQxkcfZzB8m9GUXpGuPKsHF1PzySU5wjA7VU4G2sgjJ/CgqlOXtLXw== 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=1711937500; 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=N38aq129gxwc9ngT595oPbzrsRZ0zJhGQOkGXSjU7oo=; b=HWI/uAnZET4WoBRmQtR3puLaZe9yVAANfSGiMoNNEFL+5th0ARAGcT5ODtCLvf/TykufhI XE3JdyidpPp1E3Pqcm1qYryoDcFXMEluvKEZRItuxr0alxbDwQgMmuHoR7dLpVz1zH+yzM V8DGRJ9iC4s9wRByzktYAW30H8h58o8Y9PX8vhNCGKunkpOHM3HUZhnaMKJqANCVnYyXcL spqxlLL+m0lKRm2gPn+XlZbOx6aB6Q64HczoiBHDyTOPnvyzEDNM4AFYM1KOs4IDjDEh3x 3Em1tJRtw/xeMkTWbFKbg5VRNOr0EySkwbyYCZ7oJodmTQNAbS9DqrKX+ccVpA== 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 4V7Dz05PWNz13F4; Mon, 1 Apr 2024 02:11:40 +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 4312BeBv090808; Mon, 1 Apr 2024 02:11:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4312BepR090805; Mon, 1 Apr 2024 02:11:40 GMT (envelope-from git) Date: Mon, 1 Apr 2024 02:11:40 GMT Message-Id: <202404010211.4312BepR090805@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: 71f16d2efe7e - stable/14 - nfsd.8: Document ways to minimize Copy operation times 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: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: 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: 71f16d2efe7e9e6ba15620d5ecf6c22051feebfd Auto-Submitted: auto-generated The branch stable/14 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=71f16d2efe7e9e6ba15620d5ecf6c22051feebfd commit 71f16d2efe7e9e6ba15620d5ecf6c22051feebfd Author: Rick Macklem AuthorDate: 2024-03-18 22:40:41 +0000 Commit: Rick Macklem CommitDate: 2024-04-01 02:10:40 +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.