From: "J. Bruce Fields" <bfields@fieldses.org>
To: Daire Byrne <daire@dneg.com>
Cc: linux-nfs <linux-nfs@vger.kernel.org>
Subject: Re: nconnect & repeating BIND_CONN_TO_SESSION?
Date: Mon, 7 Feb 2022 10:53:08 -0500 [thread overview]
Message-ID: <20220207155308.GF16638@fieldses.org> (raw)
In-Reply-To: <CAPt2mGN-fqG3nMnrtaa8jWQpkTZYqQuWAR+EseD0d7CCfEPmzw@mail.gmail.com>
The server enforces a limit on the total number of connections in
net/sunrpc/svc.c:svc_check_conn_limits(). Maybe that's what you're
hitting.
By default it's (number of threads + 3) * 20. You can bump the number
of nfsd threads or change /proc/fs/nfsd/max_connections.
Weird that your limit would be 80, though, which is the number you'd
expect if the server was running with just one thread.
The only other rpc server I can think of that's involved here is the NFS
client's callback server, which does have only one thread, but
nfs_callback_create_svc() does:
/* As there is only one thread we need to over-ride the default
* maximum of 80 connections
*/
serv->sv_maxconn = 1024;
and has since the beginning. I can't see why that wouldn't work. If
80's really your limit, though, that seems like an odd coincidence.
Have you seen that "too many connections" warning in the client logs?
--b.
On Mon, Feb 07, 2022 at 03:21:41PM +0000, Daire Byrne wrote:
> Trond kindly posted a patch to fix the noresvport mount issue with
> v4.2 and recent kernels.
>
> I tested it quickly and verified ports greater than 1024 were being
> used as expected, but it seems the same issue persists. It still feels
> like it's related to the total number of server + nconnect pairings.
>
> So I can have 20 servers mounted with nconnect=4 or 10 servers mounted
> with nconnect=8 but any combination that increases the total
> connection on the client past that and at least one of the servers
> ends up in a state such that it's just sending a bind_conn_to_session
> with every operation.
>
> I'll see if I can discern anything from any packet capture (as
> suggested earlier by Rick), but it's hard to reproduce exactly in time
> and on demand. My theory is that maybe there is a timeout on the
> callback and that adding more connections is just adding more
> load/throughput and making a timeout more likely.
>
> My workaround atm is to simply use NFSv3 instead of NFSv4 which might
> be a better choice for this kind of workload anyway.
>
> Daire
>
>
> On Mon, 24 Jan 2022 at 12:33, Daire Byrne <daire@dneg.com> wrote:
> >
> > On Sun, 23 Jan 2022 at 22:42, J. Bruce Fields <bfields@fieldses.org> wrote:
> > > > I suspect it's just more recent kernels that has lost the ability to
> > > > use v4+noresvport
> > >
> > > Yes, thanks for checking that. Let us know if you narrow down the
> > > kernel any more.
> >
> > https://bugzilla.kernel.org/show_bug.cgi?id=215526
> >
> > I think it stopped working somewhere between v5.11 and v5.12. I'll try
> > and bisect it this week.
> >
> > Daire
prev parent reply other threads:[~2022-02-07 15:58 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-07 12:26 nconnect & repeating BIND_CONN_TO_SESSION? Daire Byrne
2022-01-07 17:17 ` J. Bruce Fields
2022-01-07 17:59 ` Rick Macklem
2022-01-07 18:56 ` J. Bruce Fields
2022-01-07 19:15 ` pynfs regression with nfs4.1 RNM18, RNM19 and RNM20 with ext4 dai.ngo
2022-01-07 19:41 ` Chuck Lever III
2022-01-07 20:01 ` dai.ngo
2022-01-10 9:21 ` nconnect & repeating BIND_CONN_TO_SESSION? Daire Byrne
2022-01-10 14:52 ` J. Bruce Fields
2022-01-10 17:21 ` J. Bruce Fields
2022-01-23 21:56 ` Daire Byrne
2022-01-23 22:42 ` J. Bruce Fields
2022-01-24 12:33 ` Daire Byrne
2022-02-07 15:21 ` Daire Byrne
2022-02-07 15:53 ` J. Bruce Fields [this message]
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=20220207155308.GF16638@fieldses.org \
--to=bfields@fieldses.org \
--cc=daire@dneg.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.