[Planetlab-users] limit on number of connections to a port
Ioan Raicu
iraicu at cs.uchicago.edu
Thu Oct 5 13:50:14 EDT 2006
See below:
Vivek Pai wrote:
> Ioan Raicu wrote:
>
>> If you do a "ulimit -a", you will get the OS specific limits; most
>> likely, your open file descriptors are limited to 1024 (per
>> process)... but this can be raised with the ulimit command. On a
>> dual Opteron
>
>
> As Neil Spring indicated in an earlier message, the current maximum per
> process is set to 4K on PlanetLab. This is configurable (by root), but
> so far,
> few services have had a problem with this limit.
>
>> system running SuSe Linux 9, I was able to get 60K+ concurrent TCP
>> connections.... which got pretty close to the fundamental limits of
>> 64K ports (8 bit value).
>
I meant to say 16 bit, 2^16 = 64K... sorry about that.
>
> While this portion isn't relevant to PlanetLab, it's worth pointing out
> that the port number is 16 bits, and 60K connections isn't some
> fundamental limit. Flows are identified using a 5-tuple of source and
> dest addresses and port numbers, and the protocol. If you have have more
> than one client machine (or even multiple IP addresses on a single
> machine),
> you can easily have more than 64K of these 5-tuples. If the OSes are
> configured right, you can generate a practically unlimited number of
> flows.
My "fundemental limit" of 64K connections was refering to 1 single
machine with 1 single network interface, and having all 64K connections
simultaneously active. For every single network interface, you get
another 64K connections, that is true. You say that flows are composed
of a 5-tuple, but I was refering to raw TCP connections that need a port
to communicate over, and since there are only 64K possible ports defined
in the TCP header, you cannot have more than 64K concurent and active
TCP connections on 1 single interface in 1 single machine. The bottom
line is that in practice, managing this many concurent TCP conenctions
is not trivial... so you either have a powerful machine, or you have to
manage the TCP connections very smart, and it either takes some powerful
hardware, or
If you want to explain how the 5-tuple can get you an unlimmited number
of concurent TCP connections on a single machine and a single network
interface, I'd be very curious to hear how :)
Cheers,
Ioan
>
> -Vivek
>
>> Ioan
>>
>> Neil Spring wrote:
>>
>>> If by "connections" you mean TCP connections, then yes, your
>>> application can only have as many connections as file descriptors
>>> (sockets) allocated by the kernel. (4,000-ish, I think, though
>>> people who have run into this limit are more likely to know).
>>>
>>> I don't think you're giving enough precise information for a smarter
>>> answer. Information like which system call fails with what errno
>>> value (perhaps from strace) would be helpful, but likely much more
>>> is required.
>>>
>>> -neil
>>>
>>>
>>> On Oct 4, 2006, at 3:00 AM, Parul Halwe wrote:
>>>
>>>>
>>>> Hello All,
>>>> Is there any limit on number connections that can be made
>>>> to a particular port? I am developing an application that requires
>>>> sending data packets. Initially everything works fine but after
>>>> some time I am not able to establish connection to that port.
>>>>
>>>> Thanks and Regards,
>>>> Parul Halwe
>>>>
>>>> --Parul Halwe
>>>> Student
>>>> M.Tech - 2nd Year
>>>> Computer Science and Engg. dept.
>>>> IIT Bombay
>>>>
>>>> _______________________________________________
>>>> Users mailing list: Users at lists.planet-lab.org
>>>> https://lists.planet-lab.org/mailman/listinfo/users
>>>
>>>
>>>
>>> _______________________________________________
>>> Users mailing list: Users at lists.planet-lab.org
>>> https://lists.planet-lab.org/mailman/listinfo/users
>>>
>>
>
>
--
============================================
Ioan Raicu
Ph.D. Student
============================================
Distributed Systems Laboratory
Computer Science Department
University of Chicago
1100 E. 58th Street, Ryerson Hall
Chicago, IL 60637
============================================
Email: iraicu at cs.uchicago.edu
Web: http://www.cs.uchicago.edu/~iraicu
http://dsl.cs.uchicago.edu/
============================================
============================================
More information about the Users
mailing list