HP-UX TCP/IP Performance White Paper, March 2008

30
used over a range of workload conditions, over a range of systems with various performance
characteristics.
Therefore it is highly beneficial to design such programs so that the choice of listen backlog value can either
be configured directly, or adjusted indirectly as a result of some parameters which are based on the
workload to be handled by the application. These parameters could be specified as command line options,
in a configuration file, or by means of some kind of interactive administrator interface.
The simplest choice to make is to implement a parameter which is used directly as the value that specifies
the listen backlog used by the program when setting up the listening TCP endpoint. This is specified in the
socket programming interface as the second parameter to the listen()system call.
A less direct alternative would be to give the system administrator a parameter which will specify the
fraction of "system resources" to be used by the application; such a parameter could be used to calculate
the values the program will use for various parameters such as the listen backlog.