[Bug 284616] nfsd thread count auto-tune do not respect MAXNFSDCNT
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 07 Feb 2025 12:54:01 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=284616
Rick Macklem <rmacklem@FreeBSD.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rmacklem@FreeBSD.org
--- Comment #3 from Rick Macklem <rmacklem@FreeBSD.org> ---
(In reply to florian.millet from comment #0)
A few comments.
I would consider this behaviour (ignoring MAXNFSDCNT)
a feature and not a bug. MAXNFSDCNT is cruft left
over from decades ago when nfsd kernel threads were
processes.
You'll notice some ancient cruft where children[MAXNFSCNT]
is defined, but only children[0] is actually used.
(That cruft should be cleared out, but it is harmless.)
You'll also notice that MAXNFSDCNT is defined as 256 and I
am pretty sure that there are servers that want to use ore
than that limit now (and have been able to do so for more
than a decade, due to the commit you mention.
To change that now would be a POLA violation, imho.
Why don't you just use the #maxthreads option to set the
limit to what you need?
(If this doesn't work, that is a bug that needs to be fixed.)
I'll admit that "man nfsd" is misleading, in that it states
that "-n" is the equivalent of setting both #minthreads and
#maxthreads to the same value.
This is inaccurate, as you note. It should say that "-n" is
deprecated in favor of #minthreads, #maxthreads.
Note that having too many kernel threads does not impact the
system much. An inactive kernel thread mostly just uses a
few pages for its kernel stack. (Minimal comapred to the
"processes" used decades ago.)
I will ask on freebsd-current@freebsd.org to see what others
think w.r.t. this.
--
You are receiving this mail because:
You are the assignee for the bug.