Sidebar : Solaris Network Performance Tuning Tips
Following are a selection of network performance tuning tips specific to Solaris 2.5 and later. The concepts behind these tips, however, are TCP-specific and thus apply to most operating systems. The ndd command is used to change the TCP, IP, UDP, and ARP network settings. You can list all of the appropriate variables by supplying ndd with the device name and a ?:
# ndd /dev/ip \?
# nnd /dev/tcp \?
Default values of the ndd variables can be listed by typing "ndd device variable":
# ndd /dev/ip ip_forwarding
0
You can change the ndd variables by supplying the -set option, the variable name, and the value:
# ndd -set /dev/tcp tcp_conn_req_max 32
- TCP prohibits additional connections when the sum of the number of partially completed connections and the number of connections which received the final ACK of the TCP handshake exceeds the tcp_conn_req_max variable value (which is 5 by default). tcp_conn_req_max is also known as the "listen queue", and Web servers' manuals often suggest that it be increased on busy servers. The maximum value for Solaris 2.5 is 1024, and you would want to increase it to at least 32.
- Increase the window sizes to 65535:
tcp_cwnd_max (the maximum value of the congestion window, default is 65535)
tcp_xmit_hiwat (maximum value of the tcp transmit window)
tcp_recv_hiwat (maximum value of the tcp receive window)
- Set tcp_rexmit_interval_max (maximum retransmit timeout interval) to 10000.
- Tune the tcp_rexmit_interval_min (the interval TCP waits before retransmitting the packet again). The default is 200 (ms), start by increasing it to 1000.
- Decrease tcp_ip_abort_interval (total retransmit timeout value for a TCP connection after it is established) to 60000.
- Decrease tcp_close_wait_interval (the 2MSL value: time spent in the TIME_WAIT state) to 60000.
- Decrease tcp_keepalive_interval (the time that a connection must be idle before a keepalive probe is sent) to 300000.
- Turn off DNS Reverse lookups; you can gain up to 10% in overall performance. The logging will be faster, because the Web server will not have to reverse-lookup all those IP addresses. Additionally, consider whether you really need logging; about 10% performance can be gained by turning it off. If you still want those nice domain names for reports, you can write a small Perl script to convert IP addresses to hostnames.
|