All of lore.kernel.org
 help / color / mirror / Atom feed
* RE: [PATCH] xprt sharing (was Re: xprt_bindresvport)
@ 2004-12-08 19:08 Lever, Charles
  2004-12-08 21:58 ` Mike Waychison
  2004-12-09 11:22 ` Olaf Kirch
  0 siblings, 2 replies; 17+ messages in thread
From: Lever, Charles @ 2004-12-08 19:08 UTC (permalink / raw)
  To: Mike Waychison; +Cc: Olaf Kirch, nfs

> > but also notice this cuts the usable port range in half=20
> (from ~800 to
> > ~420).  we need some form of mitigation to ensure we aren't=20
> limiting the
> > number of NFS mounts a client can have.
>=20
> This has been bugging me for a while.  The fact that we are limitting
> ourselves to a single nfs mount per port.  From what I can=20
> tell, Solaris
> shares the transports between nfs mounts from the same server=20
> and saves
> themselves a lot of trouble with running out of port numbers=20
> in doing so.
>=20
> The attached patch does the same for Linux against 2.6.9.  We share
> xprts from existing connections, effectively removing any limit on the
> number of nfs mounts we have in the system.
>=20
> The only thing to worry about now is any talking to the portmapper or
> mountd from userspace using tcp, which will put the reserved ports in
> TIME_WAIT state.  This can limit the 'speed' at which we=20
> mount many mounts.

we're looking at a similar solution.  we want to make sure we don't
limit the scalability of everyone's mount point by making them all
funnel through a single slot table.


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 17+ messages in thread
* RE: [PATCH] xprt sharing (was Re: xprt_bindresvport)
@ 2004-12-09 14:03 Lever, Charles
  0 siblings, 0 replies; 17+ messages in thread
From: Lever, Charles @ 2004-12-09 14:03 UTC (permalink / raw)
  To: Olaf Kirch, Trond Myklebust; +Cc: Mike Waychison, nfs

> But two separate mounts with separate sockets do not=20
> serialize (at least they shouldn't).

there's so much spin locking and BKL activity in both the RPC client and
the NFS client that effectively, there is significant serialization
today.

> > Note also that we could also create pools of several=20
> transport sockets=20
> > per server: the current locking scheme allows for that too.=20
> That would=20
> > improve per-request scalability at the same time as it allows us to=20
> > limit the privileged port usage.
>=20
> Yes, that would help scalability a lot.

that's one direction we would like to take after the transport switch
API is integrated into 2.6.


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 17+ messages in thread
* Re: [PATCH] xprt sharing (was Re: xprt_bindresvport)
@ 2004-12-09  8:54 Peter Åstrand
  2004-12-09 11:14 ` Olaf Kirch
  0 siblings, 1 reply; 17+ messages in thread
From: Peter Åstrand @ 2004-12-09  8:54 UTC (permalink / raw)
  To: nfs

On Wed, 8 Dec 2004, Mike Waychison wrote:

> This has been bugging me for a while.  The fact that we are limitting
> ourselves to a single nfs mount per port.  From what I can tell, Solaris
> shares the transports between nfs mounts from the same server and saves
> themselves a lot of trouble with running out of port numbers in doing so.
> 
> The attached patch does the same for Linux against 2.6.9.  We share
> xprts from existing connections, effectively removing any limit on the
> number of nfs mounts we have in the system.

Good work! 


> The only thing to worry about now is any talking to the portmapper or
> mountd from userspace using tcp, which will put the reserved ports in
> TIME_WAIT state.  This can limit the 'speed' at which we mount many
> mounts.

How about using SO_REUSEADDR?

-- 
Peter Åstrand		Chief Developer
Cendio			www.thinlinc.com
Teknikringen 3		www.cendio.se
583 30 Linköping        Phone: +46-13-21 46 00




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 17+ messages in thread
* RE: [PATCH] xprt sharing (was Re: xprt_bindresvport)
@ 2004-12-08 22:00 Lever, Charles
  0 siblings, 0 replies; 17+ messages in thread
From: Lever, Charles @ 2004-12-08 22:00 UTC (permalink / raw)
  To: Mike Waychison; +Cc: Olaf Kirch, nfs

i don't have a patch like this, but trond may have something.

> -----Original Message-----
> From: Mike Waychison [mailto:Michael.Waychison@Sun.COM]=20
> Sent: Wednesday, December 08, 2004 4:58 PM
> To: Lever, Charles
> Cc: Olaf Kirch; nfs@lists.sourceforge.net
> Subject: Re: [PATCH] xprt sharing (was Re: [NFS] xprt_bindresvport)
>=20
>=20
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>=20
> Lever, Charles wrote:
> >>>but also notice this cuts the usable port range in half=20
> >>
> >>(from ~800 to
> >>
> >>>~420).  we need some form of mitigation to ensure we aren't=20
> >>
> >>limiting the
> >>
> >>>number of NFS mounts a client can have.
> >>
> >>This has been bugging me for a while.  The fact that we are=20
> limitting
> >>ourselves to a single nfs mount per port.  From what I can=20
> >>tell, Solaris
> >>shares the transports between nfs mounts from the same server=20
> >>and saves
> >>themselves a lot of trouble with running out of port numbers=20
> >>in doing so.
> >>
> >>The attached patch does the same for Linux against 2.6.9.  We share
> >>xprts from existing connections, effectively removing any=20
> limit on the
> >>number of nfs mounts we have in the system.
> >>
> >>The only thing to worry about now is any talking to the=20
> portmapper or
> >>mountd from userspace using tcp, which will put the=20
> reserved ports in
> >>TIME_WAIT state.  This can limit the 'speed' at which we=20
> >>mount many mounts.
> >=20
> >=20
> > we're looking at a similar solution.  we want to make sure we don't
> > limit the scalability of everyone's mount point by making them all
> > funnel through a single slot table.
> >=20
>=20
> Can you post any work in progress for this?   The xprt patch I posted
> was written a while ago, and I just realized this afternoon that it
> doesn't seem to do the right thing for tcp sockets that are=20
> autoclosed.
>=20
> If you have a similar patch that works, it would save me the=20
> trouble ;)
>=20
>=20
> - --
> Mike Waychison
> Sun Microsystems, Inc.
> 1 (650) 352-5299 voice
> 1 (416) 202-8336 voice
>=20
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> NOTICE:  The opinions expressed in this email are held by me,
> and may not represent the views of Sun Microsystems, Inc.
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.5 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
>=20
> iD8DBQFBt3jodQs4kOxk3/MRArXNAKCaahtv7uNfhX2n2yaz/N3D18t0vgCfSOLa
> rOARY+qtJrFfWOtb0m18cSk=3D
> =3DHlXX
> -----END PGP SIGNATURE-----
>=20


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 17+ messages in thread
* RE: xprt_bindresvport
@ 2004-12-08 14:33 Lever, Charles
  2004-12-08 18:17 ` [PATCH] xprt sharing (was Re: xprt_bindresvport) Mike Waychison
  0 siblings, 1 reply; 17+ messages in thread
From: Lever, Charles @ 2004-12-08 14:33 UTC (permalink / raw)
  To: Olaf Kirch; +Cc: nfs

> the current xprt_bindresvport implementation will search for=20
> a privileged
> port by counting down from 800 to 0. I think this is a bug, because it
> will potentially interfere with services trying to bind to=20
> low ports as
> well.

is this idle speculation, or do you actually have a test case that
fails?  :^)

> The bindresvport implementation in glibc picks from the 600-1023
> range.

we should review what other RPC implementations do (namely the reference
implementation, Solaris).

but also notice this cuts the usable port range in half (from ~800 to
~420).  we need some form of mitigation to ensure we aren't limiting the
number of NFS mounts a client can have.

> I also think it would be good to start at a "random" port. Otherwise,
> when you reboot, the server may still have a TCB for the old=20
> connection
> and send you an ACK probe when you try to connect (if all=20
> goes well), and
> the client's TCP stack will RST and fail the connect. If things go
> not-so-well you have a packet filter somewhere inbetween that eats the
> ACK probe because its connection tracking engine thinks the connection
> is in half-open and shouldn't see any SYN-less ACKs yet.

i don't agree.  you're just making the bad behavior more rare by
choosing ports at random; you are not actually addressing the root
problem you describe.  is it possible to fix the RPC client to retry the
connection in this case?  and/or fix the server to recognize and remove
the context for the old connection?

introducing randomness here will make reproducing problems in this area
very difficult.


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

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

end of thread, other threads:[~2004-12-09 22:29 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-08 19:08 [PATCH] xprt sharing (was Re: xprt_bindresvport) Lever, Charles
2004-12-08 21:58 ` Mike Waychison
2004-12-09 11:22 ` Olaf Kirch
2004-12-09 13:33   ` Trond Myklebust
2004-12-09 13:41     ` Olaf Kirch
  -- strict thread matches above, loose matches on Subject: below --
2004-12-09 14:03 Lever, Charles
2004-12-09  8:54 Peter Åstrand
2004-12-09 11:14 ` Olaf Kirch
2004-12-08 22:00 Lever, Charles
2004-12-08 14:33 xprt_bindresvport Lever, Charles
2004-12-08 18:17 ` [PATCH] xprt sharing (was Re: xprt_bindresvport) Mike Waychison
2004-12-09 11:31   ` Olaf Kirch
2004-12-09 13:36     ` Trond Myklebust
2004-12-09 13:44       ` Olaf Kirch
2004-12-09 16:20         ` Trond Myklebust
2004-12-09 19:34     ` Dan Stromberg
2004-12-09 21:33       ` Trond Myklebust
2004-12-09 22:29         ` Dan Stromberg

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.