All of lore.kernel.org
 help / color / mirror / Atom feed
* NFS over TCP idle timeout
@ 2008-01-26  0:41 Paul B. Henson
       [not found] ` <Pine.GSO.4.55.0801251516550.21-z2goPYwGszwoNljnaZt3ZkHinNCOp9DfhYY8Ac/fI6A@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Paul B. Henson @ 2008-01-26  0:41 UTC (permalink / raw)
  To: linux-nfs


Does the Linux server implementation of NFS over TCP implement an idle
timeout that automatically disconnects clients after some amount of
inactivity?

I was testing NFSv4 from a Solaris 10 client to a Linux server (Gentoo,
2.6.20). The Solaris client does not tear down the TCP connection upon
system shutdown, which leaves an orphaned established TCP connection on the
server. The connection remained in the established state for days.

Sun support indicates their server automatically disconnects idle clients,
and don't consider not closing the client connection upon shutdown a bug.

I didn't find any documentation regarding the Linux implementation and idle
timeouts, although I did find the following code in net/sunrpc/svcsock.c:

-----
/* apparently the "standard" is that clients close
 * idle connections after 5 minutes, servers after
 * 6 minutes
 *   http://www.connectathon.org/talks96/nfstcp.pdf
 */
static int svc_conn_age_period = 6*60;
-----

that would seem to indicate it should close the connection after some
amount of idle time? However, empirically that doesn't seem to happen.

Should idle connections automatically be closed? Are there any tunables or
switches that need to be touched to enable that?

Thanks...


-- 
Paul B. Henson  |  (909) 979-6361  |  http://www.csupomona.edu/~henson/
Operating Systems and Network Analyst  |  henson@csupomona.edu
California State Polytechnic University  |  Pomona CA 91768

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: NFS over TCP idle timeout
       [not found] ` <Pine.GSO.4.55.0801251516550.21-z2goPYwGszwoNljnaZt3ZkHinNCOp9DfhYY8Ac/fI6A@public.gmane.org>
@ 2008-01-29  0:32   ` J. Bruce Fields
  2008-01-29  3:33     ` Paul B. Henson
  2008-01-29  3:57   ` Greg Banks
  1 sibling, 1 reply; 5+ messages in thread
From: J. Bruce Fields @ 2008-01-29  0:32 UTC (permalink / raw)
  To: Paul B. Henson; +Cc: linux-nfs

On Fri, Jan 25, 2008 at 04:41:00PM -0800, Paul B. Henson wrote:
> 
> Does the Linux server implementation of NFS over TCP implement an idle
> timeout that automatically disconnects clients after some amount of
> inactivity?
> 
> I was testing NFSv4 from a Solaris 10 client to a Linux server (Gentoo,
> 2.6.20). The Solaris client does not tear down the TCP connection upon
> system shutdown, which leaves an orphaned established TCP connection on the
> server. The connection remained in the established state for days.
> 
> Sun support indicates their server automatically disconnects idle clients,
> and don't consider not closing the client connection upon shutdown a bug.
> 
> I didn't find any documentation regarding the Linux implementation and idle
> timeouts, although I did find the following code in net/sunrpc/svcsock.c:
> 
> -----
> /* apparently the "standard" is that clients close
>  * idle connections after 5 minutes, servers after
>  * 6 minutes
>  *   http://www.connectathon.org/talks96/nfstcp.pdf
>  */
> static int svc_conn_age_period = 6*60;
> -----
> 
> that would seem to indicate it should close the connection after some
> amount of idle time? However, empirically that doesn't seem to happen.
> 
> Should idle connections automatically be closed? Are there any tunables or
> switches that need to be touched to enable that?

That sounds like a server bug to me.  Have you checked whether it still
behaves that way on more recent kernels?

--b.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: NFS over TCP idle timeout
  2008-01-29  0:32   ` J. Bruce Fields
@ 2008-01-29  3:33     ` Paul B. Henson
  0 siblings, 0 replies; 5+ messages in thread
From: Paul B. Henson @ 2008-01-29  3:33 UTC (permalink / raw)
  To: J. Bruce Fields; +Cc: linux-nfs

On Mon, 28 Jan 2008, J. Bruce Fields wrote:

> On Fri, Jan 25, 2008 at 04:41:00PM -0800, Paul B. Henson wrote:
> >
> > Does the Linux server implementation of NFS over TCP implement an idle
> > timeout that automatically disconnects clients after some amount of
> > inactivity?
>
> That sounds like a server bug to me.  Have you checked whether it still
> behaves that way on more recent kernels?

No. I'll probably be upgrading the server to 2.6.23 within the next few
weeks, but given the dearth of information I found in my searches, was
curious whether or not it was supposed to in the first place.

Thanks...


-- 
Paul B. Henson  |  (909) 979-6361  |  http://www.csupomona.edu/~henson/
Operating Systems and Network Analyst  |  henson@csupomona.edu
California State Polytechnic University  |  Pomona CA 91768

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: NFS over TCP idle timeout
       [not found] ` <Pine.GSO.4.55.0801251516550.21-z2goPYwGszwoNljnaZt3ZkHinNCOp9DfhYY8Ac/fI6A@public.gmane.org>
  2008-01-29  0:32   ` J. Bruce Fields
@ 2008-01-29  3:57   ` Greg Banks
       [not found]     ` <20080129035731.GA42391370-WP8ATAqLPZFHNW7Ns3LnmGRHvnxUvMa2@public.gmane.org>
  1 sibling, 1 reply; 5+ messages in thread
From: Greg Banks @ 2008-01-29  3:57 UTC (permalink / raw)
  To: Paul B. Henson; +Cc: linux-nfs

On Fri, Jan 25, 2008 at 04:41:00PM -0800, Paul B. Henson wrote:
> 
> Does the Linux server implementation of NFS over TCP implement an idle
> timeout that automatically disconnects clients after some amount of
> inactivity?
>  [...]
> Should idle connections automatically be closed? Are there any tunables or
> switches that need to be touched to enable that?

Try applying this

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=7a1fa065a0264f6b3d3003ba5635289f6583c478

-- 
Greg Banks, R&D Software Engineer, SGI Australian Software Group.
The cake is *not* a lie.
I don't speak for SGI.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: NFS over TCP idle timeout
       [not found]     ` <20080129035731.GA42391370-WP8ATAqLPZFHNW7Ns3LnmGRHvnxUvMa2@public.gmane.org>
@ 2008-01-29 21:53       ` Paul B. Henson
  0 siblings, 0 replies; 5+ messages in thread
From: Paul B. Henson @ 2008-01-29 21:53 UTC (permalink / raw)
  To: Greg Banks; +Cc: linux-nfs

On Tue, 29 Jan 2008, Greg Banks wrote:

> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=7a1fa065a0264f6b3d3003ba5635289f6583c478

Ah, yes, the 2.6.20 kernel I am currently running does have the change from
aaf68cfbf2241d24d46583423f6bff5c47e088b3 introducing the bias to sk_inuse.
This is probably the problem I am running into. The 2.6.23 kernel I will be
upgrading to within a week or two appears to have this fix already applied,
so hopefully that upgrade will resolve my issue.

Thanks much for the information...


-- 
Paul B. Henson  |  (909) 979-6361  |  http://www.csupomona.edu/~henson/
Operating Systems and Network Analyst  |  henson@csupomona.edu
California State Polytechnic University  |  Pomona CA 91768

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-01-29 21:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-26  0:41 NFS over TCP idle timeout Paul B. Henson
     [not found] ` <Pine.GSO.4.55.0801251516550.21-z2goPYwGszwoNljnaZt3ZkHinNCOp9DfhYY8Ac/fI6A@public.gmane.org>
2008-01-29  0:32   ` J. Bruce Fields
2008-01-29  3:33     ` Paul B. Henson
2008-01-29  3:57   ` Greg Banks
     [not found]     ` <20080129035731.GA42391370-WP8ATAqLPZFHNW7Ns3LnmGRHvnxUvMa2@public.gmane.org>
2008-01-29 21:53       ` Paul B. Henson

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.