As we have throughout the
TCP Performance Tuning
series, we're going to make sure RFC 1323 Window Scaling is enabled and increase
our send and receive window size to 1 MB. The ndd
command is the Solaris
equivalent of sysctl
in FreeBSD/Linux/Mac OS X.
sudo ndd -set /dev/tcp tcp_wscale_always 1
sudo ndd -set /dev/tcp tcp_tstamp_if_wscale 1
sudo ndd -set /dev/tcp tcp_max_buf 16777216
sudo ndd -set /dev/tcp tcp_cwnd_max 8388608
sudo ndd -set /dev/tcp tcp_xmit_hiwat 1048576
sudo ndd -set /dev/tcp tcp_recv_hiwat 1048576
To make these settings permanent, add the following lines to /etc/system
.
set ndd:tcp_wscale_always=1
set ndd:tcp_tstamp_if_wscale=1
set ndd:tcp_max_buf=16777216
set ndd:tcp_cwnd_max=8388608
set ndd:tcp_xmit_hiwat=1048576
set ndd:tcp_recv_hiwat=1048576
By default, Solaris has RFC 1323 Window Scaling and Timestamps enabled, but it never hurts to make sure.