Created
February 28, 2018 12:31
-
-
Save bewho/d510bf53f3abaa4ba98ac2ce3b9bcc39 to your computer and use it in GitHub Desktop.
内核优化
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# sysctl settings are defined through files in | |
# /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/. | |
# | |
# Vendors settings live in /usr/lib/sysctl.d/. | |
# To override a whole file, create a new file with the same in | |
# /etc/sysctl.d/ and put new settings there. To override | |
# only specific settings, add a file with a lexically later | |
# name in /etc/sysctl.d/ and put new settings there. | |
# | |
# For more information, see sysctl.conf(5) and sysctl.d(5). | |
net.ipv4.neigh.default.gc_stale_time=120 | |
# see details in https://help.aliyun.com/knowledge_detail/39428.html | |
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 | |
# see details in https://help.aliyun.com/knowledge_detail/41334.html | |
net.ipv4.tcp_max_tw_buckets = 5000 | |
net.ipv4.tcp_syncookies = 1 | |
net.ipv4.tcp_max_syn_backlog = 1024 | |
net.ipv4.tcp_synack_retries = 2 | |
net.ipv4.icmp_echo_ignore_all=1 | |
net.core.netdev_max_backlog = 262144 | |
net.core.somaxconn = 262144 | |
net.ipv4.tcp_max_orphans = 262144 | |
net.ipv4.tcp_max_syn_backlog = 262144 | |
net.ipv4.tcp_timestamps = 0 | |
net.ipv4.tcp_synack_retries = 1 | |
net.ipv4.tcp_syn_retries = 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment