From nobody Sun Aug 20 21:17:19 2023 X-Original-To: current@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 4RTT2v6Zpzz4qkJd for ; Sun, 20 Aug 2023 21:17:27 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 mx1.freebsd.org (Postfix) with ESMTPS id 4RTT2v4sPxz4JVn for ; Sun, 20 Aug 2023 21:17:27 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.17.1/8.17.1) with ESMTPS id 37KLHJY6073848 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Mon, 21 Aug 2023 00:17:23 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 37KLHJY6073848 Received: (from kostik@localhost) by tom.home (8.17.1/8.17.1/Submit) id 37KLHJoG073847; Mon, 21 Aug 2023 00:17:19 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 21 Aug 2023 00:17:19 +0300 From: Konstantin Belousov To: Mateusz Guzik Cc: Alexander Leidinger , current@freebsd.org Subject: Re: Speed improvements in ZFS Message-ID: References: <88e837aeb5a65c1f001de2077fb7bcbd@Leidinger.net> <4d60bd12b482e020fd4b186a9ec1a250@Leidinger.net> <73f7c9d3db8f117deb077fb17b1e352a@Leidinger.net> <58493b568dbe9fb52cc55de86e01f5e2@Leidinger.net> List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-14) on tom.home X-Rspamd-Queue-Id: 4RTT2v4sPxz4JVn X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] On Sun, Aug 20, 2023 at 11:07:08PM +0200, Mateusz Guzik wrote: > On 8/20/23, Alexander Leidinger wrote: > > Am 2023-08-20 22:02, schrieb Mateusz Guzik: > >> On 8/20/23, Alexander Leidinger wrote: > >>> Am 2023-08-20 19:10, schrieb Mateusz Guzik: > >>>> On 8/18/23, Alexander Leidinger wrote: > >>> > >>>>> I have a 51MB text file, compressed to about 1MB. Are you interested > >>>>> to > >>>>> get it? > >>>>> > >>>> > >>>> Your problem is not the vnode limit, but nullfs. > >>>> > >>>> https://people.freebsd.org/~mjg/netchild-periodic-find.svg > >>> > >>> 122 nullfs mounts on this system. And every jail I setup has several > >>> null mounts. One basesystem mounted into every jail, and then shared > >>> ports (packages/distfiles/ccache) across all of them. > >>> > >>>> First, some of the contention is notorious VI_LOCK in order to do > >>>> anything. > >>>> > >>>> But more importantly the mind-boggling off-cpu time comes from > >>>> exclusive locking which should not be there to begin with -- as in > >>>> that xlock in stat should be a slock. > >>>> > >>>> Maybe I'm going to look into it later. > >>> > >>> That would be fantastic. > >>> > >> > >> I did a quick test, things are shared locked as expected. > >> > >> However, I found the following: > >> if ((xmp->nullm_flags & NULLM_CACHE) != 0) { > >> mp->mnt_kern_flag |= > >> lowerrootvp->v_mount->mnt_kern_flag & > >> (MNTK_SHARED_WRITES | MNTK_LOOKUP_SHARED | > >> MNTK_EXTENDED_SHARED); > >> } > >> > >> are you using the "nocache" option? it has a side effect of xlocking > > > > I use noatime, noexec, nosuid, nfsv4acls. I do NOT use nocache. > > > > If you don't have "nocache" on null mounts, then I don't see how this > could happen. There is also MNTK_NULL_NOCACHE on lower fs, which is currently set for fuse and nfs at least.