Re: [PATCH] sunrpc: make warning in svc_check_conn_limits() more generic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
> ---
>  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@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux