分类:
2010-05-21 08:50:55
|
On Solaris 10 systems, the simplest way to tune TCP settings is to create a simple SMF service as follows:
Create an SMF profile for Directory Server tuning.
Edit the following xml file according to your environment and save the file as/var/svc/manifest/site/ndd-nettune.xml.
ndd network tuning
Before you import the ndd-nettune.xml configuration, verify that the syntax is correct. You can do this by running the following command:
$ svccfg validate /var/svc/manifest/site/ndd-nettune.xml |
Import the configuration by running the following command:
$ svccfg import /var/svc/manifest/site/ndd-nettune.xml |
For more information see the svccfg(1M) man page.
Copy the following shell script into /lib/svc/method/ndd-nettune.
#!/sbin/sh # # ident "@(#)ndd-nettune.xml 1.0 01/08/06 SMI" . /lib/svc/share/smf_include.sh . /lib/svc/share/net_include.sh # Make sure that the libraries essential to this stage of booting can be found. LD_LIBRARY_PATH=/lib; export LD_LIBRARY_PATH echo "Performing Directory Server Tuning..." >> /tmp/smf.out /usr/sbin/ndd -set /dev/tcp tcp_conn_req_max_q 1024 /usr/sbin/ndd -set /dev/tcp tcp_keepalive_interval 600000 /usr/sbin/ndd -set /dev/tcp tcp_ip_abort_cinterval 10000 /usr/sbin/ndd -set /dev/tcp tcp_ip_abort_interval 60000 # Reset the library path now that we are past the critical stage unset LD_LIBRARY_PATH
Run svcadm to enable nettune (for more information, see the svcadm(1M) man page).
Run svcs -x (for more information see the svcs(1) man page).