Linux NFS development
 help / color / mirror / Atom feed
From: Steve Dickson <steved@redhat.com>
To: Jeff Layton <jlayton@poochiereds.net>, trondmy@gmail.com
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH v2] nfsd: allow more than 64 backlogged connections
Date: Fri, 10 May 2024 07:27:35 -0400	[thread overview]
Message-ID: <985974b1-2ed2-4f26-be0f-b0abfbaaea99@redhat.com> (raw)
In-Reply-To: <17b06a56223ab70ccf79a0e6b79eef54eddc6c2e.camel@poochiereds.net>



On 5/9/24 9:31 AM, Jeff Layton wrote:
> On Fri, 2024-03-08 at 13:02 -0500, trondmy@gmail.com wrote:
>> 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.
>> Let's use the POSIX-sanctioned maximum value of SOMAXCONN.
>>
>> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
>> ---
>> v2: Use SOMAXCONN instead of a value of -1.
>>
>>   utils/nfsd/nfssvc.c | 3 ++-
>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/utils/nfsd/nfssvc.c b/utils/nfsd/nfssvc.c
>> index 46452d972407..9650cecee986 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;
> 
> Steve,
> 
> Is there some reason you've not committed this patch? It seems fairly
> straightforward. I think I sent this earlier, but:
> 
> Reviewed-by: Jeffrey Layton <jlayton@kernel.org>
> 
Thanks for the poke... The patch was not on my todo list.

I'm on it...

steved.


  reply	other threads:[~2024-05-10 11:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-08 18:02 [PATCH v2] nfsd: allow more than 64 backlogged connections trondmy
2024-03-08 18:48 ` Jeff Layton
2024-03-08 18:56 ` Chuck Lever
2024-03-11  7:55   ` Cedric Blancher
2024-04-11 19:11 ` Trond Myklebust
2024-04-12  1:56   ` Hanxiao Chen (Fujitsu)
2024-05-09 13:31 ` Jeff Layton
2024-05-10 11:27   ` Steve Dickson [this message]
2024-05-10 13:18 ` 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=985974b1-2ed2-4f26-be0f-b0abfbaaea99@redhat.com \
    --to=steved@redhat.com \
    --cc=jlayton@poochiereds.net \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trondmy@gmail.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