Points to note in CentOS Linux TCP tuning

net.ipv4.tcp_fin_timeout = 10 The timeout time of fin-wait-2 is not a TIME-WAIT clearing time. The default 2MSL time is actually 60s. The kernel is locked. You can search for information on the Internet to view the code in tcp.h. There are many online The article said that adjusting this value is to reduce the timeout period of TIME-WAIT, but it is actually wrong. My own experiment has confirmed it! Make good use of google!


net.ipv4.tcp_max_tw_buckets = 55000 In a server, the maximum number of TIME-WAIT states, which is suitable for servers with anti-generation or load balancing, such as Nginx, HAProxy, etc., adjusted according to the network and concurrency


net.ipv4.tcp_recycle = 0 This value must not be turned on when there is a NAT device, otherwise it will lose packets or the client cannot connect to the server, a lesson! In centos 8 and kernel 4.10, this parameter has been removed ^ ^ The specific principle makes good use of Google!

Guess you like

Origin blog.51cto.com/taoyeno1/2545899
Recommended