Linux NFS development
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Neil Brown <neilb@suse.de>
Cc: Jeff Layton <jlayton@redhat.com>, linux-nfs@vger.kernel.org
Subject: Re: [PATCH] sunrpc: make warning in svc_check_conn_limits() more generic
Date: Fri, 17 Oct 2008 14:20:51 -0400	[thread overview]
Message-ID: <20081017182051.GH11884@fieldses.org> (raw)
In-Reply-To: <18679.55525.146056.752860-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>

On Fri, Oct 17, 2008 at 11:14:29AM +1100, Neil Brown wrote:
> On Thursday October 16, jlayton@redhat.com wrote:
> > 
> > Thanks for the info Neil, that helps clarify this...
> > 
> > Using RLIMIT_NOFILE is an interesting idea. From a cursory look at the
> > code, the default for RLIMIT_NOFILE looks like it's generally 1024.
> > We'll have to figure that this limit will effectively act as a limit on
> > the number of concurrent lockd clients. It's not too hard to imagine a
> > server with more clients than this (think of a large compute cluster).
> 
> If all those clients used UDP, this would not be a problem.  While I
> see the value of TCP for NFS, it doesn't seem as convincing for NLM.
> 
> But I don't expect we have the luxury of insisting that clients use
> UDP for locking :-(
> 
> > 
> > The problem as you mention, is that that limit won't be easily tunable.
> > I think we need some mechanism for an admin to tune this limit. It
> > doesn't have to be tunable on the fly, but shouldn't require a kernel
> > rebuild. We could eliminate this check for single-threaded services
> > entirely, but I suppose that leaves the door open for DoS attacks
> > against those services.
> > 
> > Maybe the best thing is to go with Bruce's idea and add a sv_maxconn
> > field to the svc_serv struct. We could make that default to the max of
> > RLIMIT_NOFILE rlim_cur value or the currently calculated value.
> > Eventually we could add a mechanism to allow  someone to tune that
> > value. A module parameter would probably be fine for lockd. We might
> > even want to set the limit lower for things like the nfsv4 callback
> > thread.
> > 
> > Thoughts?
> 
> A per-service setting that defaults to something reasonable like your
> suggestions and can be over-ridden by a module parameter sounds like a
> good idea.
> If you change the module parameter via
>  /sys/modules/lockd/parameters/max_connections
> then it wouldn't take effect until the service were stopped and restarted,
> but I expect that is acceptable (and could probably be 'fixed' if really
> needed).

Sounds fine to me.

And I'd probably fix the defaults now and then hold off adding
max_connections till it'd been seen to be needed.

--b.

  parent reply	other threads:[~2008-10-17 18:21 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
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 [this message]
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=20081017182051.GH11884@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=jlayton@redhat.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neilb@suse.de \
    /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