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

hegdeshashi 01-04-2006 12: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 02: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 07: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 08: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 09:44 PM

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

hegdeshashi 01-05-2006 11:19 PM

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 01:38 AM.