Re: [PATCH RFC 0/6] nfsd: allow for a dynamically-sized threadpool
From: Chuck Lever
Date: Sat Dec 13 2025 - 14:35:11 EST
On Fri, Dec 12, 2025, at 5:39 PM, Jeff Layton wrote:
> This patchset changes nfsd to dynamically size its threadpool as
> needed. The main user-visible change is the addition of new controls
> that allow the admin to set a minimum number of threads.
>
> When the minimum is set to a non-zero value, the traditional "threads"
> setting is interpreted as a maximum number of threads instead of a
> static count. The server will start the minimum number of threads, and
> then ramp up the thread count as needed. When the server is idle, it
> will gradually ramp down the thread count.
>
> This control scheme should allow us to sanely switch between kernels
> that do and do not support dynamic threading. In the case where dynamic
> threading is not supported, the user will just get the static maximum
> number of threads.
An important consideration!
> The series is based on a set of draft patches by Neil. There are a
> number of changes from his work:
>
> 1/ his original series was based around a new setting that defined a
> maximum number of threads. This one instead adds a control to define a
> minimum number of threads.
My concern is whether one or more clients can force this mechanism
to continue creating threads until resource exhaustion causes a
denial of service.
I'm not convinced that setting a minimum number of threads is all
that interesting. Can you elaborate on why you chose that design?
--
Chuck Lever