Linux kernel tuning TCP/Memcached

Dan Ritter dsr-mzpnVDyJpH4k7aNtvndDlA at public.gmane.org
Mon Aug 2 19:59:13 EDT 2010


On Mon, Aug 02, 2010 at 06:36:43PM -0400, theBlueSage wrote:
> Hi folks,
> 
> So I have been pushing the limits of my web servers and came across a
> setting that made everything fabulous! :) However I cant understand why
> it would be off by default in Linux, and therefore wondered if anyone
> knew of a reason _not_ to use the setting. 
> 
> results. After a lot of digging/reading I found the following 3 setting
> being suggested by a linux tuning website :
> 
> /sbin/sysctl -w net.ipv4.tcp_tw_recycle=1 
> /sbin/sysctl -w net.ipv4.tcp_tw_reuse=1
> /sbin/sysctl -w net.ipv4.tcp_fin_timeout=10
> 
> now, I am familiar with the tcp_fin_timeout, but it had no affect on the
> performance. Nor did 'reuse'. However, 'recycle' was incredible. The
> performance rocked ( I hit the 300,000 target without problem, and my
> netstat result :

http://lartc.org/howto/lartc.kernel.obscure.html

excerpt:

    /proc/sys/net/ipv4/tcp_tw_recycle

    Enable fast recycling TIME-WAIT sockets. Default value is 1.
    It should not be changed without advice/request of technical
    experts.

Nevertheless, it seems to be set to zero by default on most
distros.

Hrm. Warrants further investigation.

-dsr-

-- 
http://tao.merseine.nu/~dsr/eula.html is hereby incorporated by reference.
You can't defend freedom by getting rid of it.





More information about the Discuss mailing list