Technical data
Tuning Techniques
2.1 Subsystem Attributes
2.1.7 Displaying Socket Statistics
The
socket
subsystem has three attributes that monitor socket listen queue
events:
• The
sobacklog_hiwat
attribute counts the maximum number of pending
requests to any server socket.
• The
sobacklog_drops
attribute counts the number of times the system
dropped a received SYN packet because the number of queued SYN_RCVD
connections for a socket equaled the socket’s backlog limit.
• The
somaxconn_drops
attribute counts the number of times the system
dropped a received SYN packet because the number of queued SYN_RCVD
connections for the socket equaled the upper limit on the backlog length
(
somaxconn
attribute).
The initial value of these attributes is 0. Use the
sysconfig -q socket
command
to display the current attribute values. If the values show that the queues are
overflowing, you may need to increase the socket listen queue limit.
The value of the
sominconn
attribute should equal the value of the
somaxconn
attribute. When these two attributes are equal, the value of
somaxconn_drops
will have the same value as
sobacklog_drops
.
However, if the value of the
sominconn
attribute is 0 (the default), and if one
or more server applications uses an inadequate value for the backlog argument
to its listen system call, the value of
sobacklog_drops
may increase at a rate
that is faster than the rate at which the
somaxconn_drops
counter increases. If
this occurs, you may want to increase the value of the
sominconn
attribute. See
Section 2.1.5.2 for more information.
2.2 Tuning Server Applications
In addition to tuning TCP/IP Services kernel attributes, performance
improvements can be made to server applications by:
• Ensuring adequate memory configuration
• Logging IP addresses
2.2.1 Configuring Memory for High Performance
Each connection to an Internet server requires enough memory resources for the
following:
• Kernel socket structure
• Internet protocol control block (
inpcb
) structure
• TCP control block structure
• Any socket buffer space that is needed as packets arrive and are consumed
These memory resources total 1 KB for each connection endpoint (not including
the socket buffer space), which means 10 MB of memory is required in order to
accommodate 10,000 connections.
Your server must have enough memory to handle demanding peak loads. As a
rule of thumb, if you configure ten times more memory than the server requires
on a busy day, you will have sufficient memory to handle occasional spikes of
activity.
Tuning Techniques 2–15