diff options
author | NeilBrown <neilb@suse.de> | 2024-12-09 11:41:26 +1100 |
---|---|---|
committer | Chuck Lever <chuck.lever@oracle.com> | 2025-01-06 09:37:36 -0500 |
commit | eccbbc7c00a5aae5e704d4002adfaf4c3fa4b30d (patch) | |
tree | f16f634a65312e83878b68cef5b239ade2a2dc4e /tools/perf/scripts/python/libxed.py | |
parent | de71d4e211eddb670b285a0ea477a299601ce1ca (diff) |
nfsd: don't use sv_nrthreads in connection limiting calculations.
The heuristic for limiting the number of incoming connections to nfsd
currently uses sv_nrthreads - allowing more connections if more threads
were configured.
A future patch will allow number of threads to grow dynamically so that
there will be no need to configure sv_nrthreads. So we need a different
solution for limiting connections.
It isn't clear what problem is solved by limiting connections (as
mentioned in a code comment) but the most likely problem is a connection
storm - many connections that are not doing productive work. These will
be closed after about 6 minutes already but it might help to slow down a
storm.
This patch adds a per-connection flag XPT_PEER_VALID which indicates
that the peer has presented a filehandle for which it has some sort of
access. i.e the peer is known to be trusted in some way. We now only
count connections which have NOT been determined to be valid. There
should be relative few of these at any given time.
If the number of non-validated peer exceed a limit - currently 64 - we
close the oldest non-validated peer to avoid having too many of these
useless connections.
Note that this patch significantly changes the meaning of the various
configuration parameters for "max connections". The next patch will
remove all of these.
Signed-off-by: NeilBrown <neilb@suse.de>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'tools/perf/scripts/python/libxed.py')
0 files changed, 0 insertions, 0 deletions