Skip to main content

米斯特周

Tag: Sysctl

Linux系统参数调优参考

## 一、系统参数调优

[xxxxx@localhost:/#]vi /etc/sysctl.d/99-sysctl.conf
##added by zhoutao on 2011/10/17 
net.ipv4.tcp_max_syn_backlog = 10240
net.ipv4.tcp_max_tw_buckets = 400000  
net.ipv4.tcp_max_orphans = 60000  
net.ipv4.tcp_synack_retries = 3  
net.ipv4.tcp_fin_timeout = 3  
net.core.rmem_max = 16777216  
net.core.wmem_max = 16777216  
net.core.rmem_default = 1048576  
net.core.wmem_default = 1048576  
net.core.somaxconn = 16384  
net.ipv4.tcp_rmem = 4096 87380 16777216  
net.ipv4.tcp_wmem = 4096 65536 16777216  
net.core.netdev_max_backlog = 3000  
net.ipv4.tcp_congestion_control = cubic  
net.ipv4.ip_local_port_range = 1024 65535  
net.ipv4.tcp_tw_reuse = 1  
net.ipv4.neigh.default.unres_qlen = 6  
net.ipv4.neigh.default.proxy_qlen = 96  
net.ipv4.ip_nonlocal_bind = 1  
net.ipv4.tcp_keepalive_time = 60  
net.ipv4.tcp_keepalive_probes = 3  
net.ipv4.tcp_keepalive_intvl = 10  
fs.file-max = 360000  
net.ipv4.conf.all.log_martians=1  
net.nf_conntrack_max = 25000000  
net.netfilter.nf_conntrack_max = 25000000  
net.netfilter.nf_conntrack_tcp_timeout_established = 180  
net.netfilter.nf_conntrack_tcp_timeout_time_wait = 1  
net.netfilter.nf_conntrack_tcp_timeout_close_wait = 60  
net.netfilter.nf_conntrack_tcp_timeout_fin_wait = 120