On Sat, 09 Feb 2013 13:10:47 +0800, horseriver said: > In one process ,what is the max number of opening file descriptor ? > Can it be set to infinite ? > > In network programing ,what is the essential for the maximum of connections > dealed per second In general, you'll find that "number of file descriptors" isn't what ends up killing you for high-performance network programming. What usually gets you are things like syn floods (either intentional ddos or getting slashdotted), because each time you do an accept() on an incoming connection you end up using userspace resources to handle the connection. So the *real* question becomes "how many times per second is your box able to fork() off an httpd, do all the processing required, and close the connection?" A secondary gotcha is that dying TCP connections end up stuck in FIN-WAIT and FIN-WAIT-2, And if you're trying to drive multiple 10G interfaces at line speed, it gets even more fun. Fortunately, for my application (high performance disk servers) the connections are mostly persistent, so it's "only" a problem of getting disks to move data that fast. :)
Attachment:
pgptCIDX78dE6.pgp
Description: PGP signature
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies