Net-tune

From pressy's brainbackup
Jump to: navigation, search

net-tune

there is no need to script ndd commands on startup in solaris 11.

these settings are used for higher throughput on 10Gbit network interfaces.

see: http://docs.oracle.com/cd/E26502_01/html/E29022/appendixa-28.html - Oracle Solaris 11.1 Tunable Parameters Reference Manual

ipadm set-prop -p _conn_req_max_q=8192 tcp
ipadm set-prop -p _conn_req_max_q0=8192 tcp
ipadm set-prop -p max_buf=10485760 tcp 
ipadm set-prop -p _cwnd_max=10485760 tcp
ipadm set-prop -p recv_buf=400000 tcp
ipadm set-prop -p send_buf=400000 tcp


ipadm show-prop -p _conn_req_max_q tcp
ipadm show-prop -p _conn_req_max_q0 tcp
ipadm show-prop -p max_buf tcp 
ipadm show-prop -p _cwnd_max tcp
ipadm show-prop -p recv_buf tcp 
ipadm show-prop -p send_buf tcp 

If necessary for your anticipated workload or number of servers , update the UDP and TCP ephemeral port range to a broader range.

# ipadm set-prop -p smallest_anon_port=9000 tcp
# ipadm set-prop -p smallest_anon_port=9000 udp
# ipadm set-prop -p largest_anon_port=65500 tcp
# ipadm set-prop -p largest_anon_port=65500 udp


another tuning tip is to disable the network work for threads... Small start scipt for our M and T series:

#!/bin/ksh
#
# set -x
# psradm_set_IO_no-intr
#
PSRADM_SET() {
   typeset -i M=`/usr/sbin/prtdiag | head -1 | egrep "M[3-9]000" | wc -l | sed 's/^ *//g'`
   typeset -i T=`/usr/sbin/prtdiag | head -1 | egrep "T[4-7]-[1248]" | wc -l | sed 's/^ *//g'`

   if [ $M -eq 1 ] ;then
      # M-Series
      echo "/usr/sbin/psradm -$P1 `/usr/sbin/psrinfo | /usr/bin/nawk '{getline; printf(\"%s \", $1)}'`" > /dev/console 2>&1
      /usr/sbin/psradm -$P1 `/usr/sbin/psrinfo | /usr/bin/nawk '{getline; printf("%s ", $1)}'` > /dev/console 2>&1
   elif [ $T -eq 1 ] ;then
      # T5-Series
      echo "/usr/sbin/psradm -$P1 `/usr/sbin/psrinfo | /usr/bin/nawk '{getline; printf(\"%s-\", $1); getline; getline; getline; getline; getline; getline; printf(\"%s \", $1)}'`" > /dev/console 2>&1
      /usr/sbin/psradm -$P1 `/usr/sbin/psrinfo | /usr/bin/nawk '{getline; printf("%s-", $1); getline; getline; getline; getline; getline; getline; printf("%s ", $1)}'` > /dev/console 2>&1
   else
      # echo "Can't determine the HW-Platform to set the psradm_set_IO_no-intr"
      echo "Can't determine the HW-Platform to set the psradm_set_IO_no-intr" > /dev/console 2>&1
   fi
}
# main
case "$1" in

'start')
   typeset -x P1=i
   PSRADM_SET
;;

'stop')
        /usr/bin/true
;;

'disable')
  typeset -x P1=n
  PSRADM_SET
;;

'help'|*)
        echo "psradm_set_IO_no-intr: Usage: $0 (start|stop|disable|help)."
;;

esac

exit 0