Linux operating system practice optimization Kernel Parameter Optimization (instance), linux Kernel
Abstract: Linux Server Kernel Parameter Optimization high concurrency linux production server Kernel Parameter Optimization Case Study: This optimization is suitable for apache, nginx, squid and other web applications, special services may need to be slightly adjusted. The so-called kernel optimization is mainly the System Kernel Parameter Optimization for business service applications in Linux systems. There is no special standard for the optimization, the following describes the linux kernel Optimization in a common production environment for your reference. conf Add the following kernel parameters to the end of the configuration file [aliyunzixun@xxx.comscripts] # vi/etc/
Linux Server Kernel Parameter Optimization
Case study of Kernel Parameter Optimization for High-concurrency linux production servers
Note: This optimization is suitable for apache, nginx, squid, and other web applications. Special Services may need to be slightly adjusted.
The so-called kernel optimization is mainly the System Kernel Parameter Optimization for business service applications in Linux systems. There is no special standard for the optimization, the following describes how to optimize the kernel of linux in a common production environment for your reference:
Open/etc/sysctl. conf and add the following kernel parameters to the end of the configuration file.
[Aliyunzixun@xxx.comscripts] # vi/etc/sysctl. conf
Net. ipv4.tcp _ fin_timeout = 2
Net. ipv4.tcp _ tw_reuse = 1
Net. ipv4.tcp _ tw_recycle = 1
Net. ipv4.tcp _ syncookies = 1
Net. ipv4.tcp _ keepalive_time = 600
Net. ipv4.ip _ local_port_range = 4000 65000
Net. ipv4.tcp _ max_syn_backlog = 16384
Net. ipv4.tcp _ max_tw_buckets = 36000
Net. Route 4.route. gc_timeout = 100
Net. ipv4.tcp _ syn_retries = 1
Net. ipv4.tcp _ synack_retries = 1
Net. core. somaxconn = 16384
Net. core. netdev_max_backlog = 16384
Net. ipv4.tcp _ max_orphans = 16384
# The following parameters are used to optimize the iptables firewall. If the firewall does not have a meeting prompt, ignore it.
Net. ipv4.ip _ conntrack_max = 25000000
Net. ipv4.netfilter. ip_conntrack_max = 25000000
Net. ipv4.netfilter. ip_conntrack_tcp_timeout_established = 180
Net. ipv4.netfilter. ip_conntrack_tcp_timeout_time_wait = 120
Net. ipv4.netfilter. ip_conntrack_tcp_timeout_close_wait = 60
Net. ipv4.netfilter. ip_conntrack_tcp_timeout_fin_wait = 120
[Aliyunzixun@xxx.comscripts] # sysctl-p
Reload Kernel Parameters
The above is an explanation of Kernel Parameter Optimization for linux operating system practice optimization. For more information about Kernel optimization, see the Linux operating system practice parameter search function in the upper-right corner.