Optimize Solaris’s TCP stack
Apparently Solaris comes with some crummy settings for web hosting. Here are the settings I have used to improve our web performance at our service.
victori@fab40:/etc/rc2.d# netstat -sP tcp | grep -i drop tcpTimRetransDrop = 6029 tcpTimKeepalive = 2467 tcpListenDrop = 27327 tcpListenDropQ0 = 0 tcpHalfOpenDrop = 0 tcpOutSackRetrans = 99988
If tcpListenDrop is above 0, you have more connections than the system can handle with the default settings. Increasing tcp_conn_req_max_q accordingly should fix the issue. Raise the number incrementally until tcpListenDrop stops gradually increasing.
The tcp_conn_req_max_q default is 1024.
/usr/sbin/ndd -set /dev/tcp tcp_conn_req_max_q 8192 /usr/sbin/ndd -set /dev/tcp tcp_conn_req_max_q0 8192
Lower the anonymous port range to support the larger connection queue that was defined.
/usr/sbin/ndd -set /dev/tcp tcp_smallest_anon_port 2048
Up the buffer size for transmissions, to you know….. actually make use of that 100mbit connection?
/usr/sbin/ndd -set /dev/tcp tcp_xmit_hiwat 1048576 /usr/sbin/ndd -set /dev/tcp tcp_recv_hiwat 1048576 /usr/sbin/ndd -set /dev/tcp tcp_max_buf 2097152
To persist these settings across a reboot just write out the contents to /etc/rc2.d/S99netoptimize bash file
I was told Solaris was configured out of the box for today’s hardware? wtf?


This great and uniqe Post. Thanx
no problem, thanks for the feedback.