内核参数调优

cat << EOF >> /etc/sysctl.conf
net.core.somaxconn = 4096
net.core.netdev_max_backlog = 10000
net.core.rmem_default = 2621440
net.core.wmem_default = 2621440
net.core.rmem_max = 4194304
net.core.wmem_max = 2621440
net.ipv4.ip_local_port_range = 9000 65500
net.ipv4.tcp_rmem = 8192 655360 16777216
net.ipv4.tcp_wmem = 8192 655360 16777216
net.ipv4.tcp_max_syn_backlog = 4096
net.ipv4.tcp_fin_timeout = 5
net.ipv4.tcp_synack_retries = 2
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.ipfrag_high_thresh = 16777216
net.ipv4.ipfrag_low_thresh = 15728640
kernel.sem = 256 1048576 256 4096
kernel.shmmni = 8192
kernel.sysrq = 1
fs.aio-max-nr = 6291456
vm.min_free_kbytes = 524288
vm.vfs_cache_pressure = 200
EOF

posted @ 2020-12-08 10:50  故地重游2020  阅读(214)  评论(0编辑  收藏  举报