TCP Tuning
4-8 Oracle HTTP Server powered by Apache Performance Guide
On most web servers, the defaults will be sufficient, but if you have more than 1024
concurrent users, these settings may be too low. In that case, connections will be
dropped in the handshake state because the queues are full. You can determine
whether this is a problem on your system by inspecting the values for
tcpListenDrop, tcpListenDropQ0, and tcpHalfOpenDrop with
netstat -s. If either of the first two values are nonzero, you should increase the
maximums.
The defaults are probably sufficient, but Oracle recommends that you increase the
value of tcp_conn_req_max_q to 1024. You can set these parameters with:
On Intel Solaris:
prompt>/usr/sbin/ndd -set /dev/tcp tcp_conn_req_max_q 1024
prompt>/usr/sbin/ndd -set /dev/tcp tcp_conn_req_ max_q0 1024
On HP-UX:
prompt>/usr/sbin/ndd-set /dev/tcp tcp_conn_req_m ax 1024
Changing the Data Transmission RateTypically, all packets in a data transfer are sent at once. TCP implements a slow
starting data transfer to prevent overloading a busy segment of the Internet. With
slow start, one packet is sent, an acknowledgment is received, then two packets are
sent. The number sent to the server continues to be doubled after each
acknowledgment, until the TCP transfer window limits are reached.
Some versions of Microsoft Windows (including NT 4.0 and 95) do not
acknowledge receipt of a single packet when a connection is initiated, but if two
packets are received, an acknowledgment is sent immediately. Because Solaris sends
only one packet when initiating a connection (per the TCP standard), this can
increase the connection startup time. This is especially apparent on fast local
networks, where the latency is expected to be low.
You can configure Solaris to start with two packets when initiating a data transfer:
prompt>/usr/sbin/ndd -set /dev/tcp tcp_slow_star t_initial 2
Changing the Data Transfer Window SizeThe size of the TCP transfer windows for sending and receiving data determine
how much data can be sent without waiting for an acknowledgment. The default
window size is 8192 bytes. Unless your system is memory constrained, these
windows should be increased to the maximum size of 32768. This can speed up