Sun Java System Application Server Enterprise Edition 8.2 Performance Tuning Guide

ProcedureTo tune the TCP/IP settings

  1. Add the following entry to /etc/rc.local


    echo 30 > /proc/sys/net/ipv4/tcp_fin_timeout
    echo 60000 > /proc/sys/net/ipv4/tcp_keepalive_time
    echo 15000 > /proc/sys/net/ipv4/tcp_keepalive_intvl
    echo 0 > /proc/sys/net/ipv4/tcp_window_scaling
  2. Add the following to /etc/sysctl.conf


    # Disables packet forwarding
    net.ipv4.ip_forward = 0
    # Enables source route verification
    net.ipv4.conf.default.rp_filter = 1
    # Disables the magic-sysrq key
    kernel.sysrq = 0
    net.ipv4.ip_local_port_range = 1204 65000
    net.core.rmem_max = 262140
    net.core.rmem_default = 262140
    net.ipv4.tcp_rmem = 4096 131072 262140
    net.ipv4.tcp_wmem = 4096 131072 262140
    net.ipv4.tcp_sack = 0
    net.ipv4.tcp_timestamps = 0
    net.ipv4.tcp_window_scaling = 0
    net.ipv4.tcp_keepalive_time = 60
    net.ipv4.tcp_keepalive_intvl = 15
    net.ipv4.tcp_fin_timeout = 30
  3. Add the following as the last entry in /etc/rc.local


    sysctl -p /etc/sysctl.conf
  4. Reboot the system.

  5. Use this command to increase the size of the transmit buffer:


    tcp_recv_hiwat ndd /dev/tcp 8129 32768