SMF and tcp tuning

Before Solaris 10 when one want to pre set some ndd setting, one setup some rc3 script e.g. S99ndd that contain ndd /dev/tcp scripts.
In solaris 10 there is similar but different way of setting these paramaters using the new SMF.Directory server TCP tuning I also copy these text in this page #

Edit the following xml file according to your environment and save the file as /var/svc/manifest/site/ndd-nettune.xml.

<?xml version="1.0"?>
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/ service_bundle.dtd.1">
<!--
    ident    "@(#)ndd-nettune.xml    1.0    04/09/21 SMI"
-->

<service_bundle type='manifest' name='SUNWcsr:ndd'>

<service
    name='network/ndd-nettune'
    type='service'
    version='1'>

			<create_default_instance enabled='true' />

			<single_instance />

		<dependency
        name='fs-minimal'
        type='service'
        grouping='require_all'
        restart_on='none'>

			<service_fmri value='svc:/system/filesystem/minimal' />
		</dependency>

		<dependency
        name='loopback-network'
        grouping='require_any'
        restart_on='none'
        type='service'>
			<service_fmri value='svc:/network/loopback' />
		</dependency>

		<dependency
        name='physical-network'
        grouping='optional_all'
        restart_on='none'
        type='service'>
			<service_fmri value='svc:/network/physical' />
		</dependency>

		<exec_method
        type='method'
        name='start'
        exec='/lib/svc/method/ndd-nettune'
        timeout_seconds='3' />
		</exec_method>

		<exec_method
               type='method'
               name='stop'
               exec=':true'
               timeout_seconds='3' >
		</exec_method>

		<property_group name='startd' type='framework'>
			<propval name='duration' type='astring'  value='transient' />
		</property_group>

		<stability value='Unstable' />

		<template>
			<common_name>
				<loctext xml:lang='C'>
					ndd network tuning

				</loctext>
			</common_name>
			<documentation>
				<manpage title='ndd' section='1M'
                manpath='/usr/share/man' />
			</documentation>
		</template>

</service>

</service_bundle>
  • 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).

  • one can download these files
    ndd-nettune.txt
    ndd-nettune.xml
    Comments:

    Post a Comment:
    • HTML Syntax: NOT allowed
    About

    hstsao

    Search

    Top Tags
    Archives
    « March 2015
    SunMonTueWedThuFriSat
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
        
           
    Today