mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: Frank van Maarseveen <frankvm@frankvm.com>
Cc: Mohit Katiyar <katiyar.mohit@gmail.com>,
	linux-kernel@vger.kernel.org,
	Linux NFS mailing list <nfs@lists.sourceforge.net>
Subject: Re: NFS inconsistent behaviour
Date: Wed, 18 Oct 2006 13:57:09 -0400	[thread overview]
Message-ID: <1161194229.6095.81.camel@lade.trondhjem.org> (raw)
In-Reply-To: <20061018063945.GA5917@janus>

On Wed, 2006-10-18 at 08:39 +0200, Frank van Maarseveen wrote:
> On Wed, Oct 18, 2006 at 10:22:44AM +0900, Mohit Katiyar wrote:
> > I checked it today and when i issued the netstat -t ,I could see a lot
> > of tcp connections in TIME_WAIT state.
> > Is this a normal behaviour?
> 
> yes... but see below
> 
> > So we cannot mount and umount infinitely
> > with tcp option? Why there are so many connections in waiting state?
> 
> I think it's called the 2MSL wait: there may be TCP segments on the
> wire which (in theory) could disrupt new connections which reuse local
> and remote port so the ports stay in use for a few minutes. This is
> standard TCP behavior but only occurs when connections are improperly
> shutdown. Apparently this happens when umounting a tcp NFS mount but
> also for a lot of other tcp based RPC (showmount, rpcinfo).  I'm not
> sure who's to blame but it might be the rpc functions inside glibc.
> 
> I'd switch to NFS over udp if this is problem.

Just out of interest. Why does anyone actually _want_ to keep
mount/umounting to the point where they run out of ports? That is going
to kill performance in all sorts of unhealthy ways, not least by
completely screwing over any caching.

Note also that you _can_ change the range of ports used by the NFS
client itself at least. Just edit /proc/sys/sunrpc/{min,max}_resvport.
On the server side, you can use the 'insecure' option in order to allow
mounts that originate from non-privileged ports (i.e. port > 1024).
If you are using strong authentication (for instance RPCSEC_GSS/krb5)
then that actually makes a lot of sense, since the only reason for the
privileged port requirement was to disallow unprivileged NFS clients.

Cheers,
  Trond


  reply	other threads:[~2006-10-18 17:57 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <A93BD15112CD05479B1CD204F7F1D4730513DB@exch-04.noida.hcltech.com>
2006-10-16  7:13 ` Mohit Katiyar
2006-10-16  8:46   ` Frank van Maarseveen
2006-10-16  9:35     ` Mohit Katiyar
2006-10-16  9:39       ` Frank van Maarseveen
2006-10-18  1:22         ` Mohit Katiyar
2006-10-18  6:39           ` Frank van Maarseveen
2006-10-18 17:57             ` Trond Myklebust [this message]
2006-10-18 18:37               ` Trond Myklebust
2006-10-18 18:38               ` Frank van Maarseveen
2006-10-18 19:26                 ` Trond Myklebust
2006-10-18 20:09                   ` [NFS] " Frank van Maarseveen
2006-10-18 20:17                     ` Chuck Lever
2006-10-18 20:44                       ` Trond Myklebust
2006-10-19 12:11                       ` Alan Cox
2006-10-19  1:53               ` Mohit Katiyar

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=1161194229.6095.81.camel@lade.trondhjem.org \
    --to=trond.myklebust@fys.uio.no \
    --cc=frankvm@frankvm.com \
    --cc=katiyar.mohit@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nfs@lists.sourceforge.net \
    /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

all inboxes | Powered by JetHome®