All of lore.kernel.org
 help / color / mirror / Atom feed
From: trondmy@gmail.com
To: Steve Dickson <SteveD@redhat.com>
Cc: linux-nfs@vger.kernel.org
Subject: [PATCH] nfsd: allow more than 64 backlogged connections
Date: Thu,  7 Mar 2024 16:39:13 -0500	[thread overview]
Message-ID: <20240307213913.2511954-1-trond.myklebust@hammerspace.com> (raw)

From: Trond Myklebust <trond.myklebust@hammerspace.com>

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.
By converting to using an argument of -1, we allow the backlog to be set
by the default value in /proc/sys/net/core/somaxconn.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
---
 utils/nfsd/nfssvc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/utils/nfsd/nfssvc.c b/utils/nfsd/nfssvc.c
index 46452d972407..c781054dbdae 100644
--- a/utils/nfsd/nfssvc.c
+++ b/utils/nfsd/nfssvc.c
@@ -205,7 +205,7 @@ 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, -1)) {
 			xlog(L_ERROR, "unable to create listening socket: "
 				"errno %d (%m)", errno);
 			rc = errno;
-- 
2.44.0


             reply	other threads:[~2024-03-07 21:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-07 21:39 trondmy [this message]
2024-03-08  7:40 ` [PATCH] nfsd: allow more than 64 backlogged connections Cedric Blancher
2024-03-08 16:54 ` Jeff Layton
2024-03-08 17:58   ` Trond Myklebust

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=20240307213913.2511954-1-trond.myklebust@hammerspace.com \
    --to=trondmy@gmail.com \
    --cc=SteveD@redhat.com \
    --cc=linux-nfs@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.