nfsd: allow more than 64 backlogged connections (RHEL-87752)

Signed-off-by: Steve Dickson <steved@redhat.com>
Resolves: RHEL-87752
This commit is contained in:
Steve Dickson 2025-04-22 10:00:03 -04:00
parent dbcd5cd77c
commit 53a37eaf8c
2 changed files with 41 additions and 1 deletions

View File

@ -0,0 +1,34 @@
commit 0470fd526cb15ace1241f8c60fb98fedef74307b
Author: Trond Myklebust <trond.myklebust@hammerspace.com>
Date: Fri May 10 09:09:28 2024 -0400
nfsd: allow more than 64 backlogged connections
When creating a listener socket to be handed to /proc/fs/nfsd/portlist,
we currently limit the number of backlogged connections to 64. Since
that value was chosen in 2006, the scale at which data centres operate
has changed significantly. Given a modern server with many thousands of
clients, a limit of 64 connections can create bottlenecks, particularly
at at boot time.
Let's use the POSIX-sanctioned maximum value of SOMAXCONN.
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Acked-by: Chuck Lever <chuck.lever@oracle.com>
Tested-by: Chen Hanxiao <chenhx.fnst@fujitsu.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
diff --git a/utils/nfsd/nfssvc.c b/utils/nfsd/nfssvc.c
index 46452d97..9650cece 100644
--- a/utils/nfsd/nfssvc.c
+++ b/utils/nfsd/nfssvc.c
@@ -205,7 +205,8 @@ nfssvc_setfds(const struct addrinfo *hints, const char *node, const char *port)
rc = errno;
goto error;
}
- if (addr->ai_protocol == IPPROTO_TCP && listen(sockfd, 64)) {
+ if (addr->ai_protocol == IPPROTO_TCP &&
+ listen(sockfd, SOMAXCONN)) {
xlog(L_ERROR, "unable to create listening socket: "
"errno %d (%m)", errno);
rc = errno;

View File

@ -73,7 +73,12 @@ Patch029: nfs-utils-2.5.4-mount-writable.patch
Patch030: nfs-utils-2.5.4-mount-v3-retry.patch
Patch031: nfs-utils-2.5.4-conffile-argument.patch
Patch032: nfs-utils-2.5.4-fix-nfsdcld-starting-too-early.patch
#
# RHEL9.7
#
Patch033: nfs-utils-2.5.4-rdirplus-man.patch
Patch034: nfs-utils-2.5.4-nfsd-64conns.patch
Patch100: nfs-utils-1.2.1-statdpath-man.patch
Patch101: nfs-utils-1.2.1-exp-subtree-warn-off.patch
@ -515,8 +520,9 @@ fi
%{_mandir}/*/nfsiostat.8.gz
%changelog
* Mon Apr 14 2025 Steve Dickson <steved@redhat.com> 2.5.4-35
* Tue Apr 22 2025 Steve Dickson <steved@redhat.com> 2.5.4-35
- nfs(5): Add new rdirplus functionality, clarify (RHEL-87143)
- nfsd: allow more than 64 backlogged connections (RHEL-87752)
* Sun Feb 16 2025 Steve Dickson <steved@redhat.com> 2.5.4-34
- mountstats/nfsiostat: bugfixes for iostat (RHEL-72243)