Technical data
Tuning Techniques
2.1 Subsystem Attributes
2.1.5 Modifying Socket Subsystem Attributes
The
socket
subsystem attributes control the maximum number of pending
connection attempts per server socket (that is, the maximum depth of the listen or
SYN queue) and other behavior. You may be able to improve server performance
by modifying the
socket
subsystem attributes described in Table 2–2.
Table 2–2
socket
Subsystem Attributes
Attribute Description
somaxconn
Controls the maximum number of pending TCP
connections.
sominconn
Controls the minimum number of pending TCP
connections.
sb_max
Controls the maximum size of a socket buffer.
In addition, the
socket
subsystem attributes
sobacklog_hiwat
,
sobacklog_drops
,
and
somaxconn_drops
track events related to socket listen queues. By monitoring
these attributes, you can determine whether the queues are overflowing.
2.1.5.1 Increasing the Maximum Number of Pending TCP Connections
The
socket
subsystem attribute
somaxconn
specifies the maximum number of
pending TCP connections (the socket listen queue limit) for each server socket
(for example, for the HTTP server socket). Busy servers often experience large
numbers of pending connections. If the listen queue connection limit is too small,
incoming connection requests may be dropped. Pending TCP connections can be
caused by lost packets in the internet or denial of service (DOS) attacks.
The default value for
somaxconn
is 1024.
HP recommends increasing the
somaxconn
attribute to the maximum value,
except on low-memory systems. The maximum value is 65535. Specifying a value
that is higher than the maximum value can cause unpredictable behavior.
2.1.5.2 Increasing the Minimum Number of Pending TCP Connections
The
socket
subsystem attribute
sominconn
specifies the minimum number of
pending TCP connections (backlog) for each server socket. This attribute controls
how many SYN packets can be handled simultaneously before additional requests
are discarded. Network performance can degrade if a client saturates a socket
listen queue with erroneous TCP SYN packets, effectively blocking other users
from the queue.
The value of the
sominconn
attribute overrides the application-specific backlog
value, which may be set too low for some server software. If you do not have your
application source code, you can use the
sominconn
attribute to set a sufficient
pending-connection quota.
The default value is 0.
HP recommends increasing the value of the
sominconn
attribute to the maximum
value of 65535. The value of the
sominconn
attribute should be the same as the
value of the
somaxconn
attribute (see Section 2.1.5.1).
2–8 Tuning Techniques