From owner-freebsd-current@freebsd.org Wed Sep 9 19:26:26 2020 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C9F393D9F65; Wed, 9 Sep 2020 19:26:26 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BmsSy50mSz3S6Q; Wed, 9 Sep 2020 19:26:26 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-274.local (unknown [IPv6:2601:648:8681:1cb0:1577:6de4:8b12:1f92]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id E8DC21197D; Wed, 9 Sep 2020 19:26:25 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: OpenZFS and L2ARC To: Stefan Esser , FreeBSD CURRENT , freebsd-fs@freebsd.org Cc: Matthew Macy , Allan Jude , Graham Perrin References: <7d54dc30-b8b1-a127-ec39-9fb759c8a55d@gmail.com> <712aa75b-b8ce-1eb0-ea0e-db1c2b7cc0c2@freebsd.org> From: John Baldwin Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5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q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: <1245cf2f-7e70-df12-a69f-11ff6f9ed5ac@FreeBSD.org> Date: Wed, 9 Sep 2020 12:26:24 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <712aa75b-b8ce-1eb0-ea0e-db1c2b7cc0c2@freebsd.org> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Sep 2020 19:26:26 -0000 On 9/9/20 1:30 AM, Stefan Esser wrote: > Am 09.09.20 um 08:46 schrieb Stefan Esser: >> Am 09.09.20 um 00:45 schrieb Graham Perrin: >>> Recalling >>> , >>> on 28/03/2020 15:17,28/03/2020 15:17, Allan Jude wrote: >>> >>>  >> … >>>  >> >>>  >> Basically 'arc' was converted to a subtree. >>>  >> >>>  >> We should add some backwards compat sysctls to cover some of >>>  >> these renames etc so configs and scripts don't break etc. >> >> This is not possible for quite a number of sysctls, since there is >> no simple 1:1 mapping for many of them. >> >> >> And there is an annoyance that I had noticed before but now have >> tracked down: >> >> $ time sysctl kstat.zfs.misc.dbufs | wc >>    55327 2047031 16333472 >> >> real    0m16,446s >> user    0m0,055s >> sys    0m16,397s >> >> Somebody decided to put a complete list of dbufs under this sysctl >> and thus querying "kstat.zfs.misc" takes that long (16 seconds to >> generate 16 MB of output on my system), even if only a few other >> values in "kstat.zfs.misc" are needed. >> >> I do not know whether there is any chance to get that debug output >> moved out of the "misc", e.g. into a new "debug" sub-tree. I'm afraid, >> that on Linux there are scripts that expect it under this name. >> >> If it is not acceptable to the upstream, we should locally modify the >> sysctl tree to move that variable out of "misc", IMHO. (While not >> taking much time, "kstat.zfs.misc.dbgmsg" should also be relocted to >> a "debug" sub-tree, IMHO ...) >> >> zfs-stats needs tens of values from "misc", and if they are not all >> added individually to the Kstat array, this will limit the response >> time to any zfs-stats invocation. >> >> It is not too hard to add the new variables in zfs-stats and to >> adapt the calculations to derive meaningful values to display. >> >> But if it always takes 16 seconds to generate any output, I'm not >> likely to use it too often ... > > Update: I have created a fork of zfs-stats to work on: > > https://github.com/stesser/zfs-stats > > Initial change is to work around the long delay mentioned above and to > use the correct name for the vdev cache size variable and to display > the size, data contents and the corresponding compression factor of the > compressed L2ARC. > > I'll create pull requests to inform the upstream of these changes. A simple fix might be to use CTLFLAG_SKIP so that you only invoke the expensive sysctls if you request them by name, but not if you request the 'kstat.zfs' tree. -- John Baldwin