From: "J. Bruce Fields" <bfields@fieldses.org>
To: Jeff Layton <jlayton@redhat.com>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH] sunrpc: make warning in svc_check_conn_limits() more generic
Date: Wed, 24 Sep 2008 17:57:42 -0400 [thread overview]
Message-ID: <20080924215742.GG10841@fieldses.org> (raw)
In-Reply-To: <1221225127-6042-1-git-send-email-jlayton@redhat.com>
On Fri, Sep 12, 2008 at 09:12:07AM -0400, Jeff Layton wrote:
> I got a bug report from a user who got this message in his logs:
>
> lockd: too many open TCP sockets, consider increasing number of nfsd
> threads.
>
> ...lockd also started refusing connections at this point. He was
> apparently doing some testing with a highly contended lock. lockd
> started refusing connections after the first 80 and started printing
> this warning. He tried increasing the number of nfsd threads, which of
> course didn't do any good. This patch removes the "nfsd" from the
> message to make this a little less confusing.
>
> There is still an artificial limit of 80 concurrent clients with lockd.
> svc_check_conn_limits has this hardcoded check:
>
> if (serv->sv_tmpcnt > (serv->sv_nrthreads+3)*20) {
>
> ...my feeling is that we need to either raise the number or eliminate
> this check for single-threaded services like lockd. I'd first like to
> understand the rationale for setting the limit here, however. Can anyone
> clarify?
No idea, but yes, this is a problem.
Brainstorming other options:
- add a new sv_maxconnections field, give it a better default,
and maybe make it tunable some day? (Oh goody, another knob
to twiddle).
- implement the suggestion in the comment above this function
and limit connections per ip address. I guess the idea would
be to prevent a single buggy client from bringing everyone
down. Is that really likely? Results in the presence of NAT
could be hard to debug.
- Base the limit on available memory instead of number of
threads?
- Kill the check entirely? It'd help to know whether it was
originally prompted by some specific situation....
--b.
>
> Signed-off-by: Jeff Layton <jlayton@redhat.com>
> ---
> net/sunrpc/svc_xprt.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c
> index bf5b5cd..340f549 100644
> --- a/net/sunrpc/svc_xprt.c
> +++ b/net/sunrpc/svc_xprt.c
> @@ -536,7 +536,7 @@ static void svc_check_conn_limits(struct svc_serv *serv)
> /* Try to help the admin */
> printk(KERN_NOTICE "%s: too many open "
> "connections, consider increasing the "
> - "number of nfsd threads\n",
> + "number of threads\n",
> serv->sv_name);
> }
> /*
> --
> 1.5.5.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2008-09-24 21:57 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-12 13:12 [PATCH] sunrpc: make warning in svc_check_conn_limits() more generic Jeff Layton
2008-09-24 21:57 ` J. Bruce Fields [this message]
2008-09-25 20:23 ` Jeff Layton
[not found] ` <20080925162315.6f29d092-RtJpwOs3+0O+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2008-10-15 12:14 ` Jeff Layton
[not found] ` <20081015081457.56ef3778-RtJpwOs3+0O+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2008-10-15 20:21 ` J. Bruce Fields
2008-10-16 0:51 ` Jeff Layton
[not found] ` <20081015205118.14de4611-RtJpwOs3+0O+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2008-10-16 2:08 ` NeilBrown
[not found] ` <fdcfe437d88ecb7d49ea4b2729407dc5.squirrel-eq65iwfR9nKIECXXMXunQA@public.gmane.org>
2008-10-16 13:48 ` Jeff Layton
2008-10-17 0:14 ` Neil Brown
[not found] ` <18679.55525.146056.752860-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
2008-10-17 14:55 ` William A. (Andy) Adamson
[not found] ` <89c397150810170755r578ae723o89ab7b475b894704-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-10-17 18:29 ` J. Bruce Fields
2008-10-17 18:20 ` J. Bruce Fields
2008-10-17 18:27 ` Jeff Layton
[not found] ` <20081017142753.6485571f-RtJpwOs3+0O+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2008-10-17 18:29 ` J. Bruce Fields
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=20080924215742.GG10841@fieldses.org \
--to=bfields@fieldses.org \
--cc=jlayton@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.