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

转载: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_range
    echo "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.


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值