Search squid archive

Re: I want to purge too many TIME_WAITs immediately after closing HTTP port.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



mån 2008-02-25 klockan 17:59 +0900 skrev S.KOBAYASHI:
> Hello there,
> 
> I have a bit problem while majoring the squid performance now. 
> There are many TIME_WAIT connections left on the squid port by using high
> performance http client machine, and then the next connection can not
> connect the squid. The client machine has capability to send up to 10,000
> req/s.

Why do you consider the TIME_WAIT as such to be a problem? There is no
significant problem to have some hundreds of thousand TIME_WAIT sockets
on a server port. They only consume a little bit of memory each (some
hundreds bytes).

> I tried to change Linux machine's some parameters as bellow.
> 
> sysctl -w net.ipv4.tcp_tw_recycle=1

This often have a negative impact.

> sysctl -w net.ipv4.tcp_max_tw_buckets=50000

This will reduce the number of TIME_WAIT sockets to at most 50000, but
will also make the TCP/IP stack no longer conform to specifications and
bad things may happen to legitime traffic from this.

> sysctl -w net.ipv4.tcp_fin_timeout=1

Having this too low may cause a little problem to clients accessing
certain sites incompatible with persistent connections. May result in
connections hanging and never completing in the view of the client.

> Does anyone know how to purge the TIME_WAIT connections immediately?

You do not want to do that. Proper TCP/IP depends on TIME_WAIT.

> The machine running the squid has 16GB memory, the fastest CPU and running
> on 64 bit mode.

So I don't think you need to worry at all about the sockets when they
have reached the TIME_WAIT state.

Regards
Henrik

Attachment: signature.asc
Description: Detta =?ISO-8859-1?Q?=E4r?= en digitalt signerad meddelandedel


[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux