支持linux百万级并发的参

时间:2018-07-13 06:20:15
【文件属性】:
文件名称:支持linux百万级并发的参
文件大小:7KB
文件格式:TXT
更新时间:2018-07-13 06:20:15
linux 百万级并发 支持linux百万级并发的参数, To support over 500k users, you *need* - A 64 bits hardware/kernel (AMD64, Opterons) - At least 8GB of ram - A recent linux kernel (2.6.x) About tuning, I prefer to not fully disclose them because servers are targets of many attacks, so it's better not help hackers. The most touchy thing is the IP route cache : You have to tune it or else the machine drops many connections (hint : rhash_entries=... in the boot append string) hints : echo 1 > /proc/sys/net/ipv4/route/gc_interval echo 150 >/proc/sys/net/ipv4/route/gc_timeout echo 2 >/proc/sys/net/ipv4/route/gc_elasticity - Use of hugeTLB pages hint : echo xxx >/proc/sys/vm/nr_hugepages Tune tcp : echo "4096 49152 131072" >/proc/sys/net/ipv4/tcp_wmem echo xxxx >/proc/sys/net/ipv4/tcp_max_syn_backlog echo xxxx >/proc/sys/net/core/somaxconn echo 1200000 > /proc/sys/net/ipv4/tcp_max_tw_buckets echo 7 >/proc/sys/net/ipv4/tcp_retries2

网友评论