内核参数优化/etc/sysctl.conf

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了内核参数优化/etc/sysctl.conf相关的知识,希望对你有一定的参考价值。

net.nf_conntrack_max = 65536000
net.netfilter.nf_conntrack_tcp_timeout_established = 1200
net.ipv4.tcp_fin_timeout = 30
net.ipv4.tcp_keepalive_time = 1200
net.ipv4.route.gc_timeout = 100
net.ipv4.ip_local_port_range = 1024 65000
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_syn_retries = 1
net.ipv4.tcp_synack_retries = 1
net.ipv4.tcp_max_syn_backlog = 262144
net.core.netdev_max_backlog = 262144
sysctl: setting key "net.core.somaxconn": Invalid argument
net.core.somaxconn = 262144
net.ipv4.tcp_mem = 94500000 915000000 927000000

 

# allow testing with buffers up to 128MB
net.core.rmem_max = 134217728
net.core.wmem_max = 134217728
# increase Linux autotuning TCP buffer limit to 64MB
net.ipv4.tcp_rmem = 4096 87380 67108864
net.ipv4.tcp_wmem = 4096 65536 67108864
# increase the length of the processor input queue
net.core.netdev_max_backlog = 250000
# recommended default congestion control is htcp
net.ipv4.tcp_congestion_control = htcp
# recommended for hosts with jumbo frames enabled
net.ipv4.tcp_mtu_probing = 1

net.netfilter.nf_conntrack_max = 2100000

net.netfilter.nf_conntrack_max = 1048576

net.netfilter.ip_conntrack_tcp_timeout_established = 3600

net.netfilter.nf_conntrack_tcp_timeout_close_wait = 60

net.netfilter.nf_conntrack_tcp_timeout_fin_wait = 120

net.netfilter.nf_conntrack_tcp_timeout_time_wait = 120

 

以上是关于内核参数优化/etc/sysctl.conf的主要内容,如果未能解决你的问题,请参考以下文章

总结Oracle系统内核参数优化设置

linux 内核参数优化

linux 内核参数优化

linux 内核参数优化

一般优化linux的内核,需要优化啥参数

linux内核参数优化