Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Aug 2023 08:19:28 +0200
From:      Alexander Leidinger <Alexander@Leidinger.net>
To:        Konstantin Belousov <kostikbel@gmail.com>
Cc:        Mateusz Guzik <mjguzik@gmail.com>, current@freebsd.org
Subject:   Re: Speed improvements in ZFS
Message-ID:  <58ac6211235c52d744666e8ae2ec7568@Leidinger.net>
In-Reply-To: <ZOKC3-6uyPUO8qNY@kib.kiev.ua>
References:  <CAGudoHG5Fgg4184SsXhzqYRR7VPaBXZoirGvyRyJX5ihX5YG-A@mail.gmail.com> <ed1f82dd26d3cc9ec9cc16505109ec40@Leidinger.net> <CAGudoHEP8TrSzz0TL-PsOx0WNc7z3042wJk-jhhVwhTyJ0VEQQ@mail.gmail.com> <88e837aeb5a65c1f001de2077fb7bcbd@Leidinger.net> <4d60bd12b482e020fd4b186a9ec1a250@Leidinger.net> <CAGudoHE7RPcHpQEqKbzRM8cJcYKue17=iPVv8iOfZq03h22tTA@mail.gmail.com> <73f7c9d3db8f117deb077fb17b1e352a@Leidinger.net> <CAGudoHGPw0Dmnv6ont8JGyLsT7qv%2BQqAFZO3tKOpNo3eN%2BJgLQ@mail.gmail.com> <58493b568dbe9fb52cc55de86e01f5e2@Leidinger.net> <CAGudoHEyZh1DU=j_6mOfB3tSKhC-pNokPgONDbf4oF3D3A5=jg@mail.gmail.com> <ZOKC3-6uyPUO8qNY@kib.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
Am 2023-08-20 23:17, schrieb Konstantin Belousov:
> On Sun, Aug 20, 2023 at 11:07:08PM +0200, Mateusz Guzik wrote:
>> On 8/20/23, Alexander Leidinger <Alexander@leidinger.net> wrote:
>> > Am 2023-08-20 22:02, schrieb Mateusz Guzik:
>> >> On 8/20/23, Alexander Leidinger <Alexander@leidinger.net> wrote:
>> >>> Am 2023-08-20 19:10, schrieb Mateusz Guzik:
>> >>>> On 8/18/23, Alexander Leidinger <Alexander@leidinger.net> 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.

11 of those 122 nullfs mounts are ZFS datasets which are also NFS 
exported. 6 of those nullfs mounts are also exported via Samba. The NFS 
exports shouldn't be needed anymore, I will remove them.

Shouldn't this implicit nocache propagate to the mount of the upper fs 
to give the user feedback about the effective state?

Bye,
Alexander.

-- 
http://www.Leidinger.net Alexander@Leidinger.net: PGP 0x8F31830F9F2772BF
http://www.FreeBSD.org    netchild@FreeBSD.org  : PGP 0x8F31830F9F2772BF



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?58ac6211235c52d744666e8ae2ec7568>