硬件配置如下:
CPU : 48核心 Intel(R) Xeon(R) CPU E5-2676 v3 @ 2.40GHz
内存 :总量:188G 使用量:18G
硬盘 :SSD 240G
系统参数优化如下:
1. vi /etc/sysctl.conf
net.ipv4.tcp_syncookies = 1
net.core.somaxconn = 8192
net.core.rmem_default = 262144
net.core.wmem_default = 262144
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
net.ipv4.tcp_rmem = 40960 40960 16777216
net.ipv4.tcp_wmem = 40960 40960 16777216
net.ipv4.tcp_mem = 786432 2097152 3145728
net.ipv4.tcp_max_syn_backlog = 60000
net.core.netdev_max_backlog = 100000
net.ipv4.tcp_fin_timeout = 15
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_max_orphans = 1000000
fs.file-max = 1048576
net.ipv4.ip_local_port_range = 1024 65535
net.netfilter.nf_conntrack_max = 1000000
/sbin/sysctl -p
2.
(需要重启)
vi /etc/security/limits.conf
* soft nofile 100000
* hard nofile 120000
(不需要重启)
ulimit -Hn 100000
ulimit -Sn 120000
3. vi /etc/pam.d/login
session required /lib/security/pam_limits.so
内存 :总量:188G 使用量:18G
硬盘 :SSD 240G
系统参数优化如下:
1. vi /etc/sysctl.conf
net.ipv4.tcp_syncookies = 1
net.core.somaxconn = 8192
net.core.rmem_default = 262144
net.core.wmem_default = 262144
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
net.ipv4.tcp_rmem = 40960 40960 16777216
net.ipv4.tcp_wmem = 40960 40960 16777216
net.ipv4.tcp_mem = 786432 2097152 3145728
net.ipv4.tcp_max_syn_backlog = 60000
net.core.netdev_max_backlog = 100000
net.ipv4.tcp_fin_timeout = 15
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_max_orphans = 1000000
fs.file-max = 1048576
net.ipv4.ip_local_port_range = 1024 65535
net.netfilter.nf_conntrack_max = 1000000
/sbin/sysctl -p
2.
(需要重启)
vi /etc/security/limits.conf
* soft nofile 100000
* hard nofile 120000
(不需要重启)
ulimit -Hn 100000
ulimit -Sn 120000
3. vi /etc/pam.d/login
session required /lib/security/pam_limits.so