HP-UX 11i Version 2 Release Notes (October 2003)
Libraries and Programming
400K File Descriptors
Chapter 9
203
RLIMIT_NOFILE defaults can be changed (as in previous releases) by modifying the
kernel tunables maxfiles (5) and maxfiles_lim (5). See the kctune (1M) and kcweb (1M)
manpages and the SAM online kernel configuration help for more information.
Any system running an application that uses a large amount of file descriptors might
need to be reconfigured with a larger value for the kernel tunable nfile. This tunable
specifies the per-machine (as opposed to per-process) maximum number of simultaneous
open files and is by default much less than 1048576. See the nfile (5), kctune (1M) and
kcweb (1M) manpages and the SAM online kernel configuration help for more
information.
This new functionality might have the following possible effects:
• For all user-space code (commands, libraries, applications, and user code):
User-space code that raises its RLIMIT_NOFILE resource limit with setrlimit (see
above) beyond MAXFUPLIM might fail. Since the system's maximum value is
dynamically controlled by a tunable, an application may set its maximum number of
file descriptors larger than MAXFUPLIM. This may cause failures in kernel system
calls that compare against the MAXFUPLIM value or a related upper limit (e.g., select
(2)).
• Side effects of 400K file descriptor functionality with libraries:
Use of this new feature is not compatible with all libraries. Users need to review the
libraries used by their application to determine if they can use this feature. The use
of 400K file descriptors in conjunction with some libraries is not supported. A library
compiled with the old MAXFUPLIM value might not work with applications using the
new MAXFUPLIM value. Any calls to select (2) made by a library function on behalf of
the application would fail if you had more than 2048 or 60,000 (if the library was
previously compiled with _USE_BIG_FDS) open files, as in the preceding item above.
The use of 400K file descriptors in conjunction with the following libraries is not
supported:
— X Window System libraries
— dce threads libraries
— Pascal and Fortran libraries
— pre-10.10 libraries
— 3D graphics libraries (Starbase, HP PEX, and HP-PHIGS)
— third-party libraries
• Side effects of 400K file descriptor functionality with applications:
Programs that opt for 400K file descriptors might experience excessive memory
usage or performance degradation if there is a dependency on MAXFUPLIM.
Compatibility
The use of the _USE_BIG_FDS define will raise MAXFUPLIM from the default value of 2048
to 1048576. The related value of FD_SETSIZE is changed based on the definition of
_USE_BIG_FDS as follows:
• The default value will remain at 2048 if _USE_BIG_FDS is not defined.