Centos 系统部署前性能优化


cat >> /etc/security/limits.conf<<-EOF
* soft nofile 65535
* hard nofile 65535
* soft core unlimited 
EOF 


##kernel optimize
cat >> /etc/sysctl.conf <<EOF
fs.file-max = 999999
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_syn_retries = 1
net.ipv4.tcp_synack_retries = 1
net.ipv4.tcp_keepalive_time = 600
net.ipv4.tcp_fin_timeout = 30
net.ipv4.tcp_max_tw_buckets = 5000
net.ipv4.ip_local_port_range = 1024    65500
net.ipv4.tcp_max_syn_backlog = 4096
net.core.netdev_max_backlog = 16384
net.core.somaxconn = 16384
net.ipv4.tcp_max_orphans =16384
net.ipv4.tcp_rmem = 4096 32768 262142
net.ipv4.tcp_wmem = 4096 32768 262142
vm.swappiness = 10
EOF
sysctl –p

 

上一篇:linux的mac获取(未测试)


下一篇:centos7:无法分配内存 (errno=12)