LAST_ACK过多的问题

LAST_ACK过多的问题

分析的很仔细,并且我在实际中用到了~ 转过来保留
net.ipv4.tcp_fin_timeout=30
net.ipv4.tcp_max_syn_backlog = 65536
net.core.netdev_max_backlog =  32768
net.core.somaxconn = 32768
net.core.wmem_default = 8388608
net.core.rmem_default = 8388608
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
net.ipv4.tcp_timestamps = 0
net.ipv4.tcp_synack_retries = 2
net.ipv4.tcp_syn_retries = 2
net.ipv4.tcp_tw_recycle = 1
#net.ipv4.tcp_tw_len = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_mem = 94500000 915000000 927000000
net.ipv4.tcp_max_orphans = 32768
net.ipv4.ip_local_port_range = 1024  65535
以下解决了LAST_ACK过多的问题
# 当keepalive打开的情况下,TCP发送keepalive消息的频率。(默认值是7200(2小时),服务器建议设为1800)
net.ipv4.tcp_keepalive_time = 1800
# 在近端丢弃TCP连接之前﹐要进行多少次重试。默认值是7个﹐在大负载服务器上建议调整为3)
net.ipv4.tcp_orphan_retries = 3
# 探测消息发送的频率,乘以tcp_keepalive_probes就得到对于从开始探测以来没有响应的连接杀除的时间。(默认值为75秒,推荐设为15秒)
net.ipv4.tcp_keepalive_intvl = 15

优化前:             优化后:
LAST_ACK 374         LAST_ACK 50
SYN_RECV 91          SYN_RECV 33
ESTABLISHED 216      ESTABLISHED 185
FIN_WAIT1 63         FIN_WAIT1 8

你可能感兴趣的:(IOCP)