MAX limit of file descriptor

Valdis.Kletnieks at vt.edu Valdis.Kletnieks at vt.edu
Mon Feb 11 14:24:16 EST 2013


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. :)

-------------- 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/3494baf2/attachment.bin 


More information about the Kernelnewbies mailing list