|
发表于 2003-11-14 01:36:20
|
显示全部楼层
试试调整一下tcp/ip参数, For Linux kernel 2.2,其它版本未经证实。
/sbin/sysctl -w net.ipv4.tcp_max_syn_backlog=1280 或者更大
Increases the size of the socket queue (effectively, q0).
/sbin/sysctl -w net.ipv4.tcpsyn_cookies=1
Enables support for TCP SYN cookies, which mitigates the effectiveness of SYN floods. However, this may cause performance problems for large windows (see RFC1323 and RFC2018). To read more about SYN cookies, please review DJ Bernstein's paper here.
/sbin/sysctl -w net.ipv4.conf.all.send_redirects=0
/sbin/sysctl -w net.ipv4.conf.all.accept_redirects=0
/sbin/sysctl -w net.ipv4.conf.all.accept_source_route=0
Drop all source route packets.
/sbin/sysctl -w net.ipv4.conf.all.forwarding=0
/sbin/sysctl -w net.ipv4.conf.all.mc_forwarding=0
/sbin/sysctl -w net.ipv4.vs.timeout_timewait=60 缩短连接超时时间
Sockets will linger in TIME_WAIT state for no more than 60 seconds.
/sbin/sysctl -w net.ipv4.icmp_echo_ignore_broadcasts=1
Do not respond to directed broadcasts.
原文
http://www.cymru.com/Documents/ip-stack-tuning.html |
|