From nobody Thu May 09 20:24:48 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 4Vb3Qm33cJz5KRfN; Thu, 09 May 2024 20:24:48 +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 4Vb3Qm2c5pz4py9; Thu, 9 May 2024 20:24:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715286288; 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=VTNeNsxhRWeRyYKK1VUmQGOdX+2zqhewUkPbGMdqL3Y=; b=o6NN/TyoD03k96NkWqOX7Z4pSE2R/qeTzHr6GdFmtUr/u7Dnn+5ekLBy8iNgFz+SQnpdV2 2MYBFMUN2XJncknk7pEpylzRbOEWVItfb2+4cfWB7XOE3VQvAk0MmuOzOMeH19gDYI9iED 8dMyOtW/y/bs4DJ3WqIEfV9GMv91NRIiSwsalVZ8XSUi9xFpZZ+1a+pUueZfAa/bntGFZ7 rNkJWfKpISYCz7DcqjYo6H+UHyxU4dhWMYVxl19jeq9vYzVcI1VKj1anlhDmTha7dvoPBm S3qyguyMlSJmAQx1Ru/hcSwpWaxkngDBSYgMBoabe44e92egQNu/BaF0y9zQbg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1715286288; a=rsa-sha256; cv=none; b=o1zucEiKTgDy4XWcGclAh+Wz/AEvI3KHkX6qGWhgfhQwbbAvRHI+8oEJ3mbUQPYehzyJJT 0jIy5WVhy8GccsZW0OoKZrqA+ZF/8JudOWy3uoqYK33O9Pl1A1yIOtkr88XTGzCvdHhHtX N5VFJkRTsV50F3gYGx8UbWtGrbwPCGh3jAVmO7T5xlgXPnLX6BphSX0yfmAh6NSnAlAtZa Crx5Z3sLOacrP6hnrgovQiaxXQ3xgTvkmi0AriFWPFRpqsnGgZ7bKVtNx09HoJARKQcXuD DkBGGRsvGr5YUNUH49DAK8FMhMCxpnW+3qN75SwLZvWmwPNMi9N5cFWFkGqXNg== 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=1715286288; 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=VTNeNsxhRWeRyYKK1VUmQGOdX+2zqhewUkPbGMdqL3Y=; b=NN5wTllh9zt+DYIOQ2fc0Uumj1pA37qxiLRSNm6JDafwRKkBLze/1ZQbdT/1bd6ZheD3X0 f6osIy+q0uLkFzfGNAv2dcPSQdYCIK7wzVAMqo7AvnplK+hxtiDC/PeNmZ9E+XUqOp6B9T 36IF259P1Se1W5VoE8pYjDW7OkO7WIDvOCJGVaV6C32f9ISIGWH6M3Sd1DiTuvD/Pe9pdK JJdQ3N/ZOI3DHK7LiHCDB7z65B3zZWJtH7y6Tze2Kn6t6IFXLywz+Mj9kzrhJK4Nq9VUzA UpiYkCPG1lzNK/mccT3qpMW5obqTNGUgmWdqEC+rP2logmrC9883YLjwVnagsA== 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 4Vb3Qm2DJSz1Mxg; Thu, 9 May 2024 20:24:48 +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 449KOmsd060526; Thu, 9 May 2024 20:24:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 449KOmov060523; Thu, 9 May 2024 20:24:48 GMT (envelope-from git) Date: Thu, 9 May 2024 20:24:48 GMT Message-Id: <202405092024.449KOmov060523@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: 1c5b58a71718 - stable/14 - geli.8: minor proofreading 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1c5b58a71718b31f48fa9240ab941264355155cf Auto-Submitted: auto-generated The branch stable/14 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=1c5b58a71718b31f48fa9240ab941264355155cf commit 1c5b58a71718b31f48fa9240ab941264355155cf Author: Alan Somers AuthorDate: 2024-04-22 21:11:09 +0000 Commit: Alan Somers CommitDate: 2024-05-09 20:24:06 +0000 geli.8: minor proofreading Sponsored by: Axcient Reviewed by: imp, pauamma (manpages) Differential Revision: https://reviews.freebsd.org/D44907 (cherry picked from commit c0f02dcd4c9c17181c59fa3c43259cce793a0b21) geli.8: add some notes regarding performance tuning Sponsored by: Axcient Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D44908 (cherry picked from commit 4b7949144cfbf25b0e0bf593b135a88417304d71) --- lib/geom/eli/geli.8 | 46 +++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 43 insertions(+), 3 deletions(-) diff --git a/lib/geom/eli/geli.8 b/lib/geom/eli/geli.8 index c378c591290c..098ba4d0485e 100644 --- a/lib/geom/eli/geli.8 +++ b/lib/geom/eli/geli.8 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 18, 2022 +.Dd April 24, 2024 .Dt GELI 8 .Os .Sh NAME @@ -851,6 +851,15 @@ This variable should be set in Specifies how many times the Master Key is overwritten with random values when it is destroyed. After this operation it is filled with zeros. +.It Va kern.geom.eli.use_uma_bytes +.Nm +must allocate a buffer for every write operation, used when performing +encryption. +This sysctl reports the maximum size in bytes for which geli will perform the +allocation using +.Xr UMA 9 , +as opposed to +.Xr malloc 9 . .It Va kern.geom.eli.visible_passphrase : No 0 If set to 1, the passphrase entered on boot will be visible. This alternative should be used with caution as the entered @@ -863,11 +872,14 @@ Specifies how many kernel threads should be used for doing software cryptography. Its purpose is to increase performance on SMP systems. If set to 0, a CPU-pinned thread will be started for every active CPU. +Note that this variable must be set prior to attaching +.Nm +to a disk. .It Va kern.geom.eli.batch : No 0 When set to 1, can speed-up crypto operations by using batching. Batching reduces the number of interrupts by responding to a group of crypto requests with one interrupt. -The crypto card and the driver has to support this feature. +The crypto card and the driver have to support this feature. .It Va kern.geom.eli.key_cache_limit : No 8192 Specifies how many Data Keys to cache. The default limit @@ -884,13 +896,41 @@ Reports how many times we were looking up a Data Key and it was not in cache. This sysctl is not updated for providers that need fewer Data Keys than the limit specified in .Va kern.geom.eli.key_cache_limit . -.Va kern.geom.eli.unmapped_io +.It Va kern.geom.eli.unmapped_io Enable support for unmapped I/O buffers, currently implemented only on 64-bit platforms. This is an optimization which reduces the overhead of I/O processing. This variable is intended for debugging purposes and must be set in .Pa /boot/loader.conf . .El +.Sh PERFORMANCE CONSIDERATIONS +The default value of +.Va kern.geom.eli.threads +is usually good for a system with one SSD. +However, it may need to be lowered on systems with many disks, +so as to avoid creating too much thread-switching overhead. +On systems with more disks than CPUs, it's best to set this variable +to 1. +.Pp +.Nm +internally uses +.Xr malloc 9 +to allocate memory for operations larger than +.Va kern.geom.eli.use_uma_bytes , +but malloc is slow for allocations larger than +.Va vm.kmem_zmax . +So it's best to avoid writing more than +.Ms MAX(kern.geom.eli.use_uma_bytes, vm.kmem_zmax) +in a single write operation. +On systems that format +.Xr zfs 4 +on top of +.Nm , +the maximum write size can be controlled by +.Va vfs.zfs.vdev.aggregation_limit +and +.Va vfs.zfs.vdev.aggregation_limit_non_rotating +for HDDs and SSDs, respectively. .Sh EXIT STATUS Exit status is 0 on success, and 1 if the command fails. .Sh EXAMPLES