Quoting Doug Ambrisko <ambri...@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 <ambri...@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 alexan...@leidinger.net: PGP 0x8F31830F9F2772BF
http://www.FreeBSD.org    netch...@freebsd.org  : PGP 0x8F31830F9F2772BF
diff --git a/sbin/mount/mount.8 b/sbin/mount/mount.8
index 2a877c04c07..823df63953d 100644
--- a/sbin/mount/mount.8
+++ b/sbin/mount/mount.8
@@ -28,7 +28,7 @@
 .\"     @(#)mount.8	8.8 (Berkeley) 6/16/94
 .\" $FreeBSD$
 .\"
-.Dd March 17, 2022
+.Dd April 21, 2022
 .Dt MOUNT 8
 .Os
 .Sh NAME
@@ -245,6 +245,9 @@ This file system should be skipped when
 is run with the
 .Fl a
 flag.
+.It Cm nocache
+Disable caching.
+Some filesystems may not support this.
 .It Cm noclusterr
 Disable read clustering.
 .It Cm noclusterw

Attachment: pgpYPDNVeBw1Z.pgp
Description: Digitale PGP-Signatur

Reply via email to