-   Linux - Networking (
-   -   how many TCP connections at a time? (

hegdeshashi 01-04-2006 01:36 AM

how many TCP connections at a time?
HI friends,

In a TCP stack, at a time how many TCP connections are possible ? Is there any limit?


uovgaz 01-04-2006 03:03 PM

I would say the maximum is 65536 simultaneous connections, given that there are that many ports available for use.

jcliburn 01-04-2006 08:50 PM

Each TCP socket needs a file descriptor (an integer), and there's a kernel limit on the maximum number of open file descriptors, though I don't know the kernel parameter name, nor it's default value. Additionally, each TCP socket needs a socket structure, which also consumes a small amount of memory. So as a practical matter, if you could theoretically set the max file descriptor parameter to infinity, the maximum number of TCP connections should be limited only by the quantity of available memory.

jcliburn 01-04-2006 09:04 PM

Looks like my kernel allows 101,285 file descriptors.

[jcliburn@osprey ~]# /sbin/sysctl fs.file-max
fs.file-max = 101285

stickman 01-04-2006 10:44 PM

Do quick Google search for "linux tcp tuning". You should find a few good articles on kernel and TCP tuning.

hegdeshashi 01-06-2006 12:19 AM

I am not able to find how many connections in the TCP stack in"TCP TUNING GUIDE ".

any idea regarding this one?

All times are GMT -5. The time now is 04:13 AM.