Linux sysctl optimization script #! /Bin/sh www.2cto.com sysctl-w net. ipv4.netfilter. ip_conntrack_tcp_timeout_established = 600 sysctl-w net. ipv4.netfilter. ip_conntrack_max = 1310720 sysctl-w net. ipv4.ip _ conntrack_max = 1310720 sysctl-w net. ipv4.netfilter. ip_conntrack_generic_timeout = 120 sysctl-w net. ipv4.netfilter. ip_conntrack_tcp_timeout_syn_recv = 15 sysctl-w net. ipv4.netfilter. ip_conntrack_tcp_timeout_fin_wait = 60 sysctl-w net. ipv4. Netfilter. ip_conntrack_tcp_max_retrans = 2 sysctl-w net. ipv4.netfilter. ip_conntrack_tcp_timeout_syn_recv = 6 # modify the website settings to receive the response column www.2cto.com sysctl-w net. core. netdev_max_backlog = 3000 # enable the TIME-WAIT socket reuse function, which is very effective for Web servers with a large number of connections. Sysctl-w net. ipv4.tcp _ tw_reuse = 1 sysctl-w net. ipv4.tcp _ tw_recycle = 1 # The timeout value is less than the time when FIN-WAIT-2 is connected to zookeeper, so that the system can handle more zookeeper connections. Sysctl-w net. ipv4.tcp _ fin_timeout = 30 # When less TCP KeepAlive connections are connected to zookeeper, the system can handle more zookeeper connections. Sysctl-w net. ipv4.tcp _ keepalive_time = 1800 # increase the length of the tcp syn flood column so that the system can handle more requests and send requests. Sysctl-w net. ipv4.tcp _ max_syn_backlog = 8192