From nobody Thu Jan 04 16:39:34 2024 X-Original-To: dev-commits-doc-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 4T5XP232tqz56kgR for ; Thu, 4 Jan 2024 16:39:34 +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 4T5XP223HWz4bmR; Thu, 4 Jan 2024 16:39:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704386374; 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=KRy8m3p1Y/pMcAzE8J9r9KWh147uDOz5x43b8hP9NMs=; b=L2INi7Lq7c2hP5fDz8HgIB/nOVDDgCzRv2dttEd5gsO5ag3/iyeIkjNud1+nBrgOd5hgoP Ex1z8D6O8mihGcYmGPcDpdCvQujV/4fbUgi1f+HYYSQ3N+wT7YID1+X0tyQEVUx5OVFDah JSWrr9BA6osgl5m/nnVxUVJke7egi3uaQBoMMM80hgFwbTobTd2I+hVulUGR7MqesY+IRl j66dkgfbW4l6RVt70G1Y1GsgF2Oj8PyY96lsVAi7YLKsA29CYsaykRxAA7saYlKys0yteI cH0z3gdKFcPE9keaQzhdXT3fh+M93A3qRqnaFgj23szbyRMNlYmQNXj0Q1UrWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704386374; 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=KRy8m3p1Y/pMcAzE8J9r9KWh147uDOz5x43b8hP9NMs=; b=RPxWMVkCXvucRW/PAQ9SBgJXTpC+K1YCa4eML+M3w+Asrpc3zr5zwdBH+ODqJ5zzQRug9o X82FkYnevRXCyTnTdVWmNVYCwhrDM4e2IsxsKrP/FvboMNXGZzYskpNlndlqWmfYQwt3b5 UEXsGcBtoY3soEV9rk5oSYyTYTZU1LEM5B2XVKqbLZxBbUBms8mHtkktGEYyHJKa0xr27D GK9rhQEXt9E4iW1kq9CczNAWb3URuICYP5SftHFchlhFlxTvpNdumoja1S/tiXzVl6uEsT 3fUYHqe/APPOPO0eQjXxuW9YGADbYcyedGzRs7873maOb1L1yy9LNLNYj/F9PQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704386374; a=rsa-sha256; cv=none; b=j1rgU848brNoF8da0w4weq/v4Uar6rJUESD+m8V6+mz7M+lyVsw2ZyedZAOZOFv5BZ1ecq hHrBbJFi3prqla6ArGXLw+nmxjxYrrIqESsO7YKNPhKVP0AzylsDHtn3ZQBQKe0DqyvIhL m1c04ng0N7tpcmVoelc74yxxvy7BRk0r6DniofoEC674dGg5uZkAKGA/6C0JTfkNoeantI 9KY6O4GLV8zCvHnt97/qd3TjeDoTKPjjVeXnM675TA8uroR6MU5x25u2CRzRtdxGBRO8VX +lmU+oVGZxb0B0JljEICcQmuTD3VCYoJIlXTlD6s2+My3ikNKQVpGXgEAY0BlA== 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 4T5XP211jlzLMC; Thu, 4 Jan 2024 16:39:34 +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 404GdY2c035210; Thu, 4 Jan 2024 16:39:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 404GdY26035207; Thu, 4 Jan 2024 16:39:34 GMT (envelope-from git) Date: Thu, 4 Jan 2024 16:39:34 GMT Message-Id: <202401041639.404GdY26035207@gitrepo.freebsd.org> To: doc-committers@FreeBSD.org, dev-commits-doc-all@FreeBSD.org From: Lorenzo Salvadore Subject: git: f390100c60 - main - Status/2023Q4/packrat.adoc: Add report List-Id: Commit messages for all branches of the doc repository List-Archive: https://lists.freebsd.org/archives/dev-commits-doc-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-doc-all@freebsd.org X-BeenThere: dev-commits-doc-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: salvadore X-Git-Repository: doc X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f390100c60f00e1c8b7d759aa9e2e1315742b78e Auto-Submitted: auto-generated The branch main has been updated by salvadore: URL: https://cgit.FreeBSD.org/doc/commit/?id=f390100c60f00e1c8b7d759aa9e2e1315742b78e commit f390100c60f00e1c8b7d759aa9e2e1315742b78e Author: Rick Macklem AuthorDate: 2024-01-04 16:35:40 +0000 Commit: Lorenzo Salvadore CommitDate: 2024-01-04 16:35:40 +0000 Status/2023Q4/packrat.adoc: Add report Reviewed by: status (Pau Amma ) --- .../en/status/report-2023-10-2023-12/packrat.adoc | 63 ++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/website/content/en/status/report-2023-10-2023-12/packrat.adoc b/website/content/en/status/report-2023-10-2023-12/packrat.adoc new file mode 100644 index 0000000000..afff0ddb3b --- /dev/null +++ b/website/content/en/status/report-2023-10-2023-12/packrat.adoc @@ -0,0 +1,63 @@ +=== Packrat - NFS client caching on non-volatile storage + +Contact: Rick Macklem + +NFSv4.1/4.2 provides support for a feature called delegations. +When a NFSv4.1/4.2 client holds a delegation, the client has certain rights to a file, including a guarantee that no other client will make changes to the file unless the delegation is recalled. +As such, when a client holds a delegation for a file, it can aggressively cache the file's data, knowing that it will not be modified by other clients until it returns the delegation. + +This project is intended to allow the NFSv4.1/4.2 client to aggressively cache file data on client local non-volatile storage, when the client holds a delegation for the file. +I created a patch long ago to try and do this for NFSv4.0, but it was never at a stage where it was worth using. +This project is a complete rewrite of the patch, done in part because NFSv4.1/4.2 plus other recent NFSv4-related changes make doing this more feasible. + +I now have code running fairly well and hope to have a patch ready for others to test this winter. +Early testing shows promise. +For a test run of "make buildkernel", the test with and without packrat enabled performed as follows: + +.NFS operation counts +[cols="1,1,1,1,1,1", frame="none", options="header"] +|=== +| NFS operation counts +| Getattr +| Lookup +| Read +| Write +| Total RPCs + +|with packrats +|433506 +|99254 +|0 +|0 +|371736 + +|without packrats +|2359913 +|97954 +|10748 +|0 +|2318810 + +|=== + +.Elapsed Run Time +[cols="1,1,1", frame="none", options="header"] +|=== +| Elapsed Run Time (sec) +| with packrat +| without packrat + +| +|5561 +|6203 + +|=== + +As you can see, the packrat case ran a little faster and with fewer RPCs. +Although this test was run on my little LAN, it is hoped that a NFSv4.1/4.2 mount over a WAN would show a larger difference in performance. +I will note that the packrat cache was primed by unrolling a tarball of FreeBSD's [.filename]#/usr/src# into the NFSv4.1/4.2 mount. + +This will be very much an experimental feature, but it is hoped it will allow NFS mounts to be used more effectively, particularily in WAN situations, such as a mobile laptop. + +There is still work to be done, particularily with respect to recovery of delegations after a NFSv4.1/4.2 client restart. +Hopefully, the next status report will include a URL that allows downloading of a patch for user testing.