Linux kernel parameter optimization

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.