_____  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Syzygy Dc
Sent: Friday, December 28, 2007 12:31 PM
To: theory and practice of decentralized computer networks
Subject: [p2p-hackers] maximum number of tcp conntections on linux


Hi,

I am trying to setup a TCP server on Linux server which could get requests
from millions of clients. What is the maximum number of simultaneous TCP
clients which can be connected to a TCP server running on Linux? I searched
on google and came across using sysctl to specify max number of file
descriptors. Has anyone used it and can share their experience? 

Linux network stack scales really well. I have personally used it for
handling upwards of 100K TCP sessions in ESTABLISHED state and it wasn't
showing any signs of stress. Some of the variables in /proc/sys/fs and
/proc/sys/net/ipv4 do in fact need to be tuned, but it's all pretty straight
forward if you know how TCP works. Additionally the userland code needs to
built around epoll, in which case it will also scale well.

In case of "millions of clients" your first and foremost headache will
probably be the kernel memory usage; quickly followed by CPU exhaustion
(that's assuming at least some activity on this 1 mil of connections). 

All in all, the kernel-level IO processing is not that big of a deal. It all
really comes down the amount of state data that the setup requires
(including tx/rx buffer space) and what your app does with the data. 

Alex

 
_______________________________________________
p2p-hackers mailing list
[email protected]
http://lists.zooko.com/mailman/listinfo/p2p-hackers

Reply via email to