QQ延时和IPF的timeout的设置有关系,同时为了加速加了如下的设置:
bash-2.05# vi /etc/sysem
* ipf: adjust the default tcp timeouts downward so that
* idle (dead) and half closed states get killed off quicker.
set ipf:fr_tcpidletimeout = 172800
set ipf:fr_tcphalfclosed = 7200
*
* ipf: adjust the state table sizes so we have enough buckets.
* IPSTATE_MAX (=fr_statemax) should be ~70% of IPSTATE_SIZE
* IPSTATE_SIZE (=fr_statesize) has to be a prime number
set ipf:fr_statemax = 7000
set ipf:fr_statesize = 10009
*
* ipf: adjust the NAT table sizes so we have enough buckets.
* generally you have fewer than 127 rules in ipnat.conf
* so no need to waste memory for more.
set ipf:ipf_nattable_sz = 10009
set ipf:ipf_natrules_sz = 127
set ipf:ipf_rdrrules_sz = 127
*
* note that the timers run "2 ticks to a second", so
* for example, written below is the following:
* set ipf:fr_tcpidletimeout = 172800
* this sets the tcp idle connection timeout to
* (172800/2) / 3600 = 24 hours.
*
set ipf:fr_udptimeout=2400
set ipf:fr_udpacktimeout=240