码迷,mamicode.com
首页 > 其他好文 > 详细

time_wait 过多 造成网络慢 实战

时间:2016-09-05 13:39:07      阅读:139      评论:0      收藏:0      [点我收藏+]

标签:

 

sh-3.2# scripts]# netstat -an|awk /tcp/ {++S[$NF]}END {for (a in S) print a,S[a]}
TIME_WAIT 33
ESTABLISHED 70
LISTEN 13
sh-3.2# 5 scripts]# cat /etc/sysctl.conf|awk /net.ipv4.tcp_syncookies|net.ipv4.tcp_tw_reuse|net.ipv4.tcp_tw_recycle|net.ipv4.tcp_fin_timeout/
net.ipv4.tcp_syncookies = 1

可见上面的/proc/sys/net/ipv4相关参数并没有设置:

修改如下:

[root@Salt85 scripts]# cat /etc/sysctl.conf|awk /net.ipv4.tcp_syncookies|net.ipv4.tcp_tw_reuse|net.ipv4.tcp_tw_recycle|net.ipv4.tcp_fin_timeout/
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_fin_timeout = 30
[root@Salt85 scripts]# netstat -an|awk /tcp/ {++S[$NF]}END {for (a in S) print a,S[a]}
TIME_WAIT 1
ESTABLISHED 71
LISTEN 13

解决TIME_WAITE过多的问题

time_wait 过多 造成网络慢 实战

标签:

原文地址:http://www.cnblogs.com/bass6/p/5841791.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!