Subject: Re: Fw: Re: 2.6.12-rc2-mm2

From: Indrek Kruusa <[email-masked]>
Date: Sat, 09 Apr 2005 18:07:52 +0300

Herbert Xu wrote:

>Andrew Morton <[email-masked]> wrote:
>  
>
>>dmesg is not clean though:
>>
>>TCP: time wait bucket table overflow
>>TCP: time wait bucket table overflow
>>TCP: time wait bucket table overflow
>>printk: 392 messages suppressed.
>>
>>What I did:
>>- "bombing" httpd with JMeter (from another computer)
>>    
>>
>
>This is normal.  The number of TCP connections held by
>your server in the TIME_WAIT state is exceeding
>tcp_max_tw_buckets.
>
>Check out tcp(7) on what this means and how it may or
>may not be a problem for you.
>  
>

This poor Celeron machine has only 128MB RAM and tcp_max_tw_buckets were 
calculated (ipv4/tcp.c) to be 16384. I have found
that increasing this number by 2048 (that's 12.5%) = 18432 is enough to 
not get this overflow warning again (load average was over 90). Some 
other facts:

- my current machine has 512MB RAM and calculated tcp_max_tw_buckets is 
180000 (!)
- from Documentation/networking/ip-sysctl.txt: This limit exists only to 
prevent simple DoS attacks

I believe that those values are somewhat miscalculated. At least by 
changing calculation for machines with low memory a bit you will get 
some defence against poor shouting students who had to build 
load-balancing web-clusters ;)

thanks,
Indrek