Author Archives: coder4

Linux内核网络参数优化小结

tcp建连优化
1 tcp建连,降低客户端超时时间
net.ipv4.tcp_syn_retries = 6
2 tcp建连,服务端避免syn攻击
netstat -s | grep “SYNs to LISTEN” 1192450 SYNs to LISTEN sockets dropped
可以考虑增大syn队列
net.ipv4.tcp_max_syn_backlog = 1024
超过上述队列后,启用syn cookie
net.ipv4.tcp_syncookies =[……]

继续阅读