vim /etc/sysctl.conf
net.ipv4.ip_local_port_range = 1025 65535
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_syncookies= 1
net.ipv4.tcp_fin_timeout= 30
net.ipv4.tcp_synack_retries = 1
net.ipv4.tcp_keepalive_time = 7200
net.ipv4.tcp_max_syn_backlog = 50000
net.ipv4.tcp_max_tw_buckets = 50000
net.ipv4.tcp_keepalive_intvl = 75
net.ipv4.tcp_keepalive_probes = 9
vm.max_map_count=6553600
fs.file-max = 26160679
net.core.wmem_default= 8388608
net.core.rmem_default= 8388608
net.core.rmem_max= 16777216
net.core.wmem_max= 16777216
设置Sysctl.conf用以提高Linux的性能(最完整的sysctl.conf优化方案) — CCIE那点事