[Beowulf] automount on high ports
lindahl at pbm.com
Wed Jul 2 16:04:49 EDT 2008
On Wed, Jul 02, 2008 at 08:28:48AM -0400, Perry E. Metzger wrote:
> of this should cause you to run out of ports, period. If you don't
> understand that, refer back to my original message. A TCP socket is a
> unique 4-tuple. The host:port 2-tuples are NOT unique and not an
> exhaustible resource. There is is no way that your case is going to
> even remotely exhaust the 4-tuple space.
Go look at code that actually uses priv ports to connect out. Normally
the port is picked in the connect() call, and that means you can have
all the 4-tuples. But for priv ports, you have to loop trying specific
candidate ports under 1024 until you get one, and then connect out
from it. (Here's where Linux doesn't try all 1024, because it doesn't
want to use ports that are someone else's fixed port.) The kernel
doesn't know at assignment time who you are connecting out to. In the
end, this means that the port numbers are reused slowly, and you have
to wait a TIME_WAIT time before reusing them.
Now I'm week on the details today, but this was an issue that I dealt
with long ago with PBS, which insists on using priv ports. So I ended
up hacking the kernel on the PBS master to have a reduced TIME_WAIT
time. Problem solved, yukko.
Beowulf mailing list, Beowulf at beowulf.org
To change your subscription (digest mode or unsubscribe) visit http://www.beowulf.org/mailman/listinfo/beowulf
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
More information about the Beowulf