HP-UX 11i Version 2 Release Notes (October 2003)
Libraries and Programming
400K File Descriptors
Chapter 9
204
•The value for FD_SETSIZE will default to 60,000 if _USE_BIG_FDS is defined but not
assigned a value.
•The value for FD_SETSIZE will default to (1024 * 1024) if _USE_BIG_FDS=400000 is
defined.
The default size of FD_SETSIZE will be set to (1024 * 1024) when _USE_BIG_FDS=400000
is defined. This is for compatibility with existing applications which may have assumed
that _MAXFUPLIM and FD_SETSIZE were equivalent and used them interchangeable.
After HP-UX 11i v2, no such assumption may be made about MAXFUPLIM and
FD_SETSIZE, and they are not considered to be equivalent when USE_BIG_FDS=400000 is
defined.
As a result, any application using the select (2) system call and that requires a higher
number of file descriptors must now explicitly define FD_SETSIZE (up to 400K) in the
source or at compile time. Failure to do so may result in a memory resource issue
resulting in the application terminating abnormally.
Performance
This change may positively impact performance for applications (such as Web servers)
that require a large number of simultaneously open file descriptors. This impact may be
realized if the application was limited by the current allowable number of file descriptors
and was blocked or needed to close file descriptors in order to continue processing.
The use of a large number of file descriptors will consume a considerable amount of
kernel memory that may have a negative impact on system performance.
Documentation
For further information, see the following manpages:
• select (2)
• maxfiles (5)
• maxfiles_lim (5)
• kctune (1M)
• kcweb (1M)
• nfile (5)
Obsolescence
Not applicable.