Linux内核参数优化

优化内容:

 

kernel.shmmni=1024
kernel.shmmax=4294967296
kernel.shmall=2097152
kernel.sem=250 256000 32 1024
kernel.msgmni=4096
kernel.msgmax=65536
kernel.msgmnb=65536
vm.dirty_background_ratio = 5
vm.dirty_ratio = 10
vm.swappiness = 5
vm.overcommit_memory = 0
net.ipv4.tcp_keepalive_time = 800
net.ipv4.tcp_keepalive_intvl = 30
net.ipv4.tcp_keepalive_probes = 10
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
net.ipv4.neigh.default.gc_stale_time = 120
net.ipv4.conf.all.rp_filter = 0
net.ipv4.conf.default.rp_filter = 0
net.ipv4.conf.default.arp_announce = 2
net.ipv4.conf.lo.arp_announce = 2
net.ipv4.conf.all.arp_announce = 2
net.ipv4.ip_forward = 1
net.ipv4.tcp_max_tw_buckets = 5000
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_max_syn_backlog = 8192
net.ipv4.tcp_synack_retries = 2
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
fs.inotify.max_user_watches=89100
fs.file-max=102400
fs.nr_open=102400
net.bridge.bridge-nf-call-arptables = 1

 

优化后,采用sysctl -p 生效。

 

posted @ 2019-07-01 18:03  tigergaonotes  阅读(144)  评论(0编辑  收藏  举报