Clarification of vnode sysctls as numvnodes doesnt decrease (FBSD12.2)?

Dewayne Geraghty dewayne at
Fri Sep 25 06:32:33 UTC 2020

I used procstat to tally the number of vnodes that are actually in use,
in my case its 925.  Now this is relatively idle (load <10%) unless its
building os or ports.  As we do build in jails, we have a large number
of vnodes.  From sysctl's


should vfs.numvnodes be read as 700,000 vnodes are available, or as the
memory has been allocated, or remain linked in some way to the file that
they were previously associated with(the latter seems crazy)?  In
previous versions of FreeBSD the vfs.numvnodes did decrease, somewhat.

If the vnodes are allocated, then during idle periods, would be a good
time to vacuum the vnodes, but how?

On FreeBSD 12.2-STABLE #0 r365645M
Machines current state from tallying "procstat -f -a" and some relevant
Procstat file descriptor types
vn      sock    pipe    fifo    cryp    shmem   msg     posix   kque
Proc    term
925     302     342     99      0       3       0       0       20
0       15

Procstat vnode types
block   char    dir     fifo    slink   regfile sock    revdev  notvn
0       289     303     0       0       333     0       0       782

Correlate with
Network connections via netstat -na: 160

More information about the freebsd-questions mailing list