Varnish with many TIME_WAIT sockets and traffic problems

John S. mailingoijv at
Tue Sep 27 14:51:41 CEST 2011

After more than a day of uptime for our varnish, here are some new stats.

Varnish have a full cache as of now (10GB in memory) but it is always
half-behind our Squids in name of traffic and requests, as you can see

# squid (via squidclient, all Squids have similar values)

Number of HTTP requests received:   419578741
Average HTTP requests per minute since start:   23626.1
Hits as % of all requests:  5min: 98.7%, 60min: 98.8%

HTTP/s : 393.77
Hits/s : 389.04
Mb/s   :  50.03

# varnish (via varnishstat)

client_req            25750851       268.75 Client requests received
cache_hit             25175218       262.75 Cache hits
uptime                   95816         1.00 Client uptime

HTTP/s : 268.75
Hits/s : 262.75
Mb/s   :  21.67

For netstat, Squid has ~12k sockets ESTABLISHED and ~4k TIME_WAIT
while Varnish has ~1k and ~8k respectively.

Any clue ? As this is in production right now, I will have to rollback
to Squid if I can not figure it out.

More information about the varnish-misc mailing list