MAX limit of file descriptor
Valdis.Kletnieks at vt.edu
Valdis.Kletnieks at vt.edu
Mon Feb 11 14:36:37 EST 2013
On Mon, 11 Feb 2013 06:07:38 +0800, horseriver said:
> Actually , my question comes from network performance ,I want to know ,in per second ,the
> maximum of tcp connections that can be dealed with by my server.
That will be *highly* dependent on what your server code does with each connection.
A "hello world" reply and close socket will, of course, go lots faster than
something that has to go contact an enterprise-scale database, do 3 SQL joins,
and format the results.
> How can I do the test and calculate the connection number , Is it possible that my server
> can deal with 10k tcp connections per second?
10K/sec peaks can be achieved even on a laptop, assuming a dummy do-nothing
service. Keeping that sustained for a real application will depend on the
service time needed - if you have 20 CPUs in the box, and spread the load
across all 20, you have to average under 2ms to service each request, which
will be a killer if you have to go to disk at all for a request. At that
point, the guys at Foundry will be more than happy to sell you a load-balancer
so you can have a stack of 10 20-CPU servers each of which only handles 1K/sec
and thus has a 20ms time budget.
> what is the relationship between this and throughput rate?
Lots of tiny connections will totally suck at aggregate throughput, if for no
other reason than TCP slow-start never gets a chance to really open the
transmit window up. But in general, there is always a trade-off
between transaction rate and throughput.
> Is there document that tells the best optimization of this ?
"best" is defined by what your application actually needs. The "best"
settings for my NFS server will be totally different than what the HTTP
server 12 racks over needs...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 865 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130211/1521c25d/attachment.bin
More information about the Kernelnewbies
mailing list