03 |
net.ipv4.tcp_max_syn_backlog = 65536 |
04 |
net.core.netdev_max_backlog = 32768 |
05 |
net.core.somaxconn = 32768 |
07 |
net.core.wmem_default = 8388608 |
08 |
net.core.rmem_default = 8388608 |
09 |
net.core.rmem_max = 16777216 |
10 |
net.core.wmem_max = 16777216 |
12 |
net.ipv4.tcp_timestamps = 1 |
13 |
net.ipv4.tcp_synack_retries = 2 |
14 |
net.ipv4.tcp_syn_retries = 2 |
16 |
net.ipv4.tcp_tw_recycle = 1 |
18 |
net.ipv4.tcp_tw_reuse = 1 |
20 |
net.ipv4.tcp_mem = 94500000 915000000 927000000 |
21 |
net.ipv4.tcp_max_orphans = 3276800 |
25 |
net.ipv4.ip_local_port_range = 1024 65535 |
26 |
net.ipv4.ip_conntrack_max = 655360 |
27 |
net.ipv4.netfilter.ip_conntrack_tcp_timeout_established = 180 |
30 |
如果出现error: "net.ipv4.ip_conntrack_max" is an unknown key |
31 |
error: "net.ipv4.netfilter.ip_conntrack_tcp_timeout_established" is an unknown key |
36 |
echo "modprobe ip_conntrack" >> /etc/rc. local |
38 |
modprobe(module probe) |
link:http://blog.517car.com/2011/05/15/nginx%E9%9D%99%E6%80%81%E5%A4%84%E7%90%86-%E4%BC%98%E5%8C%96linux%E5%86%85%E6%A0%B8%E5%8F%82%E6%95%B0/