Re: nullfs and ZFS issues

From: Alexander Leidinger <Alexander_at_leidinger.net>
Date: Thu, 21 Apr 2022 06:33:10 UTC
Quoting Doug Ambrisko <ambrisko@ambrisko.com> (from Wed, 20 Apr 2022  
09:20:33 -0700):

> On Wed, Apr 20, 2022 at 11:39:44AM +0200, Alexander Leidinger wrote:
> | Quoting Doug Ambrisko <ambrisko@ambrisko.com> (from Mon, 18 Apr 2022
> | 16:32:38 -0700):
> |
> | > With nullfs, nocache and settings max vnodes to a low number I can
> |
> | Where is nocache documented? I don't see it in mount_nullfs(8),
> | mount(8) or nullfs(5).
>
> I didn't find it but it is in:
> 	src/sys/fs/nullfs/null_vfsops.c:  if (vfs_getopt(mp->mnt_optnew,  
> "nocache", NULL, NULL) == 0 ||
>
> Also some file systems disable it via MNTK_NULL_NOCACHE

Does the attached diff look ok?

> | I tried a nullfs mount with nocache and it doesn't show up in the
> | output of "mount".
>
> Yep, I saw that as well.  I could tell by dropping into ddb and then
> do a show mount on the FS and look at the count.  That is why I added
> the vnode count to mount -v so I could see the usage without dropping
> into ddb.

I tried nocache on a system with a lot of jails which use nullfs,  
which showed very slow behavior in the daily periodic runs (12h runs  
in the night after boot, 24h or more in subsequent nights). Now the  
first nightly run after boot was finished after 4h.

What is the benefit of not disabling the cache in nullfs? I would  
expect zfs (or ufs) to cache the (meta)data anyway.

Bye,
Alexander.

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