Mastering Nginx

(Ron) #1

Persisting Solaris


Network Tunings


In Chapter 8, Troubleshooting Techniques, we saw how to change different network


tuning parameters for different operating systems. This appendix details what is
necessary to persist these changes under Solaris 10 and above.


The following script is what is actually run by the Service Management Framework


(SMF) to set the network parameters with ndd. Save it as /lib/svc/method/network-


tuning.sh and make it executable, so that it can be run at any time on the command
line to test:


vi /lib/svc/method/network-tuning.sh


The following snippet is the content of the /lib/svc/method/network-tuning.sh file:


#!/sbin/sh


Set the following values as desired


ndd -set /dev/tcp tcp_max_buf 16777216


ndd -set /dev/tcp tcp_smallest_anon_port 1024


ndd -set /dev/tcp tcp_largest_anon_port 65535


ndd -set /dev/tcp tcp_conn_req_max_q 1024


ndd -set /dev/tcp tcp_conn_req_max_q0 4096


ndd -set /dev/tcp tcp_xmit_hiwat 1048576


ndd -set /dev/tcp tcp_recv_hiwat 1048576


chmod 755 /lib/svc/method/network-tuning.sh


The following manifest serves to define the network-tuning service and will run the
script at boot time. Note that we specify a duration of transient to let SMF know that


this is a run-once script and not a persistent daemon.

Free download pdf