Description: This optimization is suitable for apache,nginx,squid a variety of Web applications, special business may also need a slight adjustment.
[Email protected] ~]#VI/etc/Sysctl.conf#by Suninch 20131001Net.ipv4.tcp_fin_timeout=2Net.ipv4.tcp_tw_reuse=1net.ipv4.tcp_tw_recycle=1net.ipv4.tcp_syncookies=1Net.ipv4.tcp_keepalive_time= -Net.ipv4.ip_local_port_range=4000 65000Net.ipv4.tcp_max_syn_backlog=16384net.ipv4.tcp_max_tw_buckets=36000Net.ipv4.route.gc_timeout= -net.ipv4.tcp_syn_retries=1net.ipv4.tcp_synack_retries=1Net.core.somaxconn=16384Net.core.netdev_max_backlog=16384Net.ipv4.tcp_max_orphans=16384#一下参数是对iptables防火墙的优化, the firewall does not have a meeting prompt, you can ignore. Net.ipv4.ip_conntrack_max=25000000Net.ipv4.netfilter.ip_conntrack_max=25000000net.ipv4.netfilter.ip_conntrack_tcp_timeout_established= thenet.ipv4.netfilter.ip_conntrack_tcp_timeout_time_wait= -net.ipv4.netfilter.ip_conntrack_tcp_timeout_close_wait= -net.ipv4.netfilter.ip_conntrack_tcp_timeout_fin_wait= -[[Email protected]~]# sysctl–p #使配置文件生效
Hint: Because the module name in the centos6.x system is not ip_conntrack, but nf_conntrack, so in/etc/sysctl.conf optimization, you need to put Net.ipv4.netfilter.ip_conntrack_ This old parameter of Max is changed to Net.netfilter.nf_conntrack_max.
That is, the optimization of the firewall, on 5.8 is
2500000025000000 -
On the 6.4 is
2500000025000000 -
On version 6.4
" Net.bridge.bridge-nf-call-ip6tables " "net.bridge.bridge-nf-call-iptables " " Net.bridge.bridge-nf-call-arptables"Isan unknown Key
This error is due to automatic loading of the module bridge is not automatically loaded, the solution is to automatically handle the loaded module Ip_conntrack
modprobe bridge Echo "modprobe bridge">>/etc/ Rc.local
Linux kernel parameter optimization