Most Unix variants provide fixed-size limits on the number of file descriptors that may be open simultaneously. There are usually separate system-wide and per-process limits. These limitations affect the scalability of a program like Medusa. I would like to collect information on what these limits are on various operating systems, along with advice on how to raise them.
If you have data for a particular operating system, please send it along to me so I may include it in the table here. If at all possible please try to verify these limits by experimentation, and indicate this fact to me in your message.
Note:At the time of this writing, the 2.1.x series of Linux has an unfortunate bug in select() and poll() that silently ignores all but the first 256 descriptors passed to them. This is supposed to be fixed in the 2.2 series.
|Linux 2.0.34+||256||1024||NR_OPEN||emulated with select()||recompile kernel to raise limits|
|Linux 2.1.x||1024||4096||emulated with poll()||bug-limited to 256||recompile kernel to raise limits|
|Windows NT||no hard limit||???||no hard limit||not available||Redefine FD_SETSIZE, recompile app.
(also check WSADATA.iMaxSockets)
|FreeBSD 2||no hard limit||no hard limit||yes||no||Raise MBUF clusters, recompile kernel, redefine FD_SETSIZE and recompile app, use sysctl, and limits to run.|