HP-UX Programmer's Guide for Java 2

Table Of Contents
running and each running process uses many threads, you will want to increase this
value.
Open Files
Problems occur when the value of kernel parameters are set too low for the number of
files allowed to be simultaneously open in a process. Be certain that your kernel is
configured so that you do not reach the limit for the number of open files for your
process. Java™ opens many files in order to read in the classes required to run your
application. A file descriptor is also used for each socket that is opened. Use HP
OpenView GlancePlus to analyze the total number of files open when running your
application.
nfiles
Maximum number of open files. This value is usually determined by the formula:
((NPROC*2)+1000)
NPROC is usually: ((MAXUSERS*5)+64)
For a MAXUSERS of 400, this works out to 5128. You can usually set it higher.
maxfiles
Soft file limit per process
maxfiles_lim
Hard file limit per process 2048 is the maximum value you can set through SAM for
maxfiles and maxfiles_lim.
Note that you can set the parameters higher by configuring the kernel using the
configuration file and then rebuilding the kernel (or by modifying stand/system and
doing a mk kernel). Since setting these parameters too low results typically in application
failure, you may want to calculate the number you need and then double it.
You might also consider ninode along with these parameters, that is as a member of
the "set". If there's no space in the appropriate inode table then you cannot open a new
file.
Timeouts
If the number of pending timeouts on the system exceeds the maximum number of
allowable pending timeouts on the system then the system will crash. This undesirable
behavior can be avoided by increasing the following kernel parameter:
ncallout
Maximum number of pending timeouts. If you are opening many sockets, many of
which are waiting on I/O, you will likely run into this limit.
Set ncallout to a value greater than the sum of:
nkthread + the number of I/O devices connected to the machine
32 Configuration for Java™ Support