通用内核优化配置
Posted luckwjl
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了通用内核优化配置相关的知识,希望对你有一定的参考价值。
通用内核优化配置
net.ipv4.ip_forward = 0 net.ipv4.conf.default.rp_filter = 0 net.ipv4.conf.default.accept_source_route = 0 kernel.sysrq = 0 kernel.core_uses_pid = 1 kernel.unknown_nmi_panic = 0 kernel.msgmnb = 65536 kernel.msgmax = 65536 kernel.shmmax = 68719476736 kernel.shmall = 4294967296 vm.swappiness = 10 net.ipv4.tcp_tw_reuse = 1 net.ipv4.tcp_syncookies = 1 net.ipv4.tcp_fin_timeout = 30 net.ipv4.tcp_syn_retries = 3 net.ipv4.tcp_synack_retries = 3 net.ipv4.tcp_max_orphans = 262144 net.ipv4.tcp_keepalive_time = 60 net.ipv4.tcp_max_tw_buckets = 180000 net.ipv4.conf.all.send_redirects = 0 net.ipv4.conf.default.send_redirects = 0 net.ipv4.conf.all.secure_redirects = 0 net.ipv4.conf.default.secure_redirects = 0 net.ipv4.conf.all.accept_redirects = 0 net.ipv4.conf.default.accept_redirects = 0 net.ipv4.neigh.default.gc_thresh1 = 2048 net.ipv4.neigh.default.gc_thresh2 = 4096 net.ipv4.neigh.default.gc_thresh3 = 8192 net.ipv4.ip_local_port_range = 1024 65535 net.ipv6.conf.all.disable_ipv6 = 1 fs.file-max = 1000000 fs.inotify.max_user_watches = 10000000 net.core.rmem_max = 16777216 net.core.wmem_max = 16777216 net.core.wmem_default = 16777216 net.core.rmem_default = 16777216 net.core.somaxconn = 262144 net.core.netdev_max_backlog = 262144 net.ipv4.tcp_max_syn_backlog = 8120 net.netfilter.nf_conntrack_max = 1000000
以上是关于通用内核优化配置的主要内容,如果未能解决你的问题,请参考以下文章
Linux系统初装资源限制和内核参数优化脚本(CentOS和Ubuntu通用)