[PLUG] Important trivia question : number of TCP ports available

Anthony Schlemmer aschlemm at attbi.com
Fri Jan 31 00:10:02 UTC 2003


Each socket connection on a port requires the use of a file descriptor  
so realistically you won't be able to have all 64K ports in use at any 
one time. The maximum number of ports available on a system is going to 
be based on how large the file descriptor table is on a given system.  

Also depending on what sort of processes are being run, you also have to 
contend with the fact that many programs take up 3 file descriptors by 
default...One each for stdin, stdout, and stderr. The number of file 
descriptors in use by a given process will go up further if the process 
opens other files, sockets, or any other resources that consumes file 
descriptors.

Tony
 
On Thursday 30 January 2003 16:29 pm, John Hampton wrote:
> Michael Rasmussen said:
> >We have a server that's a mail secondary.  The primary went down and
> > mail is flooding to the secondary.  The machine has at any given
> > moment ~325 to 380 open or half open TCP connections.
>
> <snip>
>
> >Now, should my linux box be able to function well with this many
> > open connections?  Is there a way to increase the number that it
> > can keep open while we fix the problem on the primary mail server?
>
> <snip>
>
> As far as I know your box should be able to do fine with that many
> connections opened (provided it's beefy enough).  I believe that
> there are 65,536 ports available.  The ports < 1024 being privileged
> ports.  If your secondary is a p100 with 32 MB RAM, then you might
> have problems keeping a large number of ports open, but on a PIII or
> so with a couple hundred megs of RAM, I think you should be fine.
>
> John Hampton
> Programmer Analyst
> G.I. Joe's, Inc.
> john.hampton at gijoes.com
>
>
> _______________________________________________
> PLUG mailing list
> PLUG at lists.pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug

-- 
Anthony Schlemmer
aschlemm at attbi.com





More information about the PLUG mailing list