Linux NFS development
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: Mike Owen <mjnowen@gmail.com>, Steve Dickson <steved@redhat.com>
Cc: Chuck Lever <chuck.lever@oracle.com>, NeilBrown <neil@brown.name>,
	Olga Kornievskaia <okorniev@redhat.com>,
	Dai Ngo <Dai.Ngo@oracle.com>, Tom Talpey <tom@talpey.com>,
		linux-nfs@vger.kernel.org
Subject: Re: [PATCH nfs-utils v2] nfsdctl: add support for min-threads parameter
Date: Fri, 23 Jan 2026 14:59:06 -0500	[thread overview]
Message-ID: <86166cb2d3e38ccbf72baa5e3150f604d2289769.camel@kernel.org> (raw)
In-Reply-To: <2b7b02aa-8759-43c4-9cd1-04a57b13cf8f@gmail.com>

On Fri, 2026-01-23 at 19:21 +0000, Mike Owen wrote:
> On 23/01/2026 18:48, Jeff Layton wrote:
> > and the thread count will dynamically fluctuate between
> > the min and max based on load.
> 
> Can "load" be described further in the manpage for users? I ask, because I'm interested to understand the heuristics it takes into account when nfsd makes a decision to increase or decrease the thread count. For example, is memory pressure + io pressure stall info + io requests all taken into account? A popular doc that is referenced in such discussions is here: [0].
> [0]: https://utcc.utoronto.ca/~cks/space/blog/linux/NFSServerHowManyThreads


In this case "load" is simply incoming RPC requests:

If the server gets an RPC request and goes to wake a thread for it, and
finds that none are idle, then it will start a new thread (providing
it's not already at the max). The threads are eligible to exit if
they've been idle for 5s.

It would be nice to make this a bit more sophisticated. In particular,
we probably don't want to start new threads when memory pressure is
high (and maybe shut some down in that case too). We'd welcome some
advice here (or even better, patches).

Thanks for link to the article, I hadn't seen that. I'm not sure I
agree with his conclusions though. On a typical server, at busy times
you probably want more threads than CPUs, simply because a lot of them
end up blocked doing I/O.
-- 
Jeff Layton <jlayton@kernel.org>

  reply	other threads:[~2026-01-23 19:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-23 18:48 [PATCH nfs-utils v2] nfsdctl: add support for min-threads parameter Jeff Layton
2026-01-23 19:21 ` Mike Owen
2026-01-23 19:59   ` Jeff Layton [this message]
2026-02-01 17:31 ` Steve Dickson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86166cb2d3e38ccbf72baa5e3150f604d2289769.camel@kernel.org \
    --to=jlayton@kernel.org \
    --cc=Dai.Ngo@oracle.com \
    --cc=chuck.lever@oracle.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=mjnowen@gmail.com \
    --cc=neil@brown.name \
    --cc=okorniev@redhat.com \
    --cc=steved@redhat.com \
    --cc=tom@talpey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox