Tune TCP time wait interval for high-load environments (HP-UX, Linux, Solaris, Windows)

來源:互聯網
上載者:User

轉載:http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=%2Fcom.ibm.websphere.edge.doc%2Fedge%2Fcp%2Fadmingd45.htm

The TCP time wait interval specifies the length of time that a socket waitsfor a FIN packet from the sender before forcibly closing. In high-load environments,the proxy server may appear to stall if a large number of sockets remain suspendedin the TIME_WAIT
state after their connections are closed. Reducing the TCPtime wait interval will reduce the number of suspended sockets and, in high-loadenvironments, may prevent the proxy server from appearing to stall. It is recommendedthat this interval be set to 5 seconds.

To set the TCP time wait interval to 5 seconds:

  • On HP-UX:

    Issue the following command:

    ndd /dev/tcp -set tcp_time_wait_interval 5000

    Use the "sam" utility to set the kernel parameter max_thread_procto at least 2048.

    Note:Also consider adjusting the following kernelparameters: maxfiles, maxfiles_lim, maxproc, shmem, tcp_conn_request_max,tcp_ip_abort_interval, tcp_keepalive_interval, tcp_rexmit_interval_initial,tcp_rexmit_interval_max, tcp_rexmit_interval_min,
    tcp_xmit_hiwater_def, tcp_recv_hiwater_def.
  • On Linux:

    Issue the following commands:

    echo "1024 61000" > /proc/sys/net/ipv4/ip_local_port_rangeecho "5" > /proc/sys/net/ipv4/tcp_fin_timeout
  • On Solaris:

    Issue the following command:

    ndd /dev/tcp -set tcp_time_wait_interval 5000

    Edit the /etc/system file to read as follows::

    set tcp:tcp_conn_hash_size=8129
  • On Windows:

    A registry entry must be created set a TCP time wait interval.Refer to your Windows documentation for more information.

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.