Linux优化

空扰寡人 提交于 2019-11-28 16:12:19

编辑如下配置文件

vim /etc/sysctl.conf

最后几行替换成

#see details in https://help.aliyun.com/knowledge_detail/41334.html

kernel.sysrq = 1

net.ipv4.tcp_max_tw_buckets = 5000
net.ipv4.tcp_max_syn_backlog = 8192
net.ipv4.tcp_synack_retries = 2

net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_tw_reuse=1
net.ipv4.tcp_tw_recycle=1
net.ipv4.tcp_fin_timeout=30

net.ipv4.tcp_keepalive_time=60
net.ipv4.tcp_keepalive_probes=5
net.core.netdev_max_backlog=3000

改完后保存,并执行下面命令让配置生效

/sbin/sysctl -p
reboot
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!