Slow connections

Joe Williams joe at
Mon Dec 28 21:55:08 CET 2009

Thanks Cosimo, I'll have to give that a shot. I use 400GB because I have 
a dedicated EC2 machine for varnish and figured I would use as much 
space as I have for it, looks like I'm actually only using around 8GB.


On 12/28/09 12:45 PM, Cosimo Streppone wrote:
> On 28 Dec 2009 19:59:02, Joe Williams <joe at> wrote:
>> Any other suggestions? Another analysis of the logs shows that varnish
>> vs other backends (CouchDB) I see an order of magnitude higher
>> percentage of 3 second connection times with varnish.
>> Here's my varnish command options
>>  and my sysctl changes
>> the sysctl on haproxy is
>> identical.
> Hi Joe,
> I didn't follow all the discussion, but a quick look made me
> think about my case.
> I practically did the same steps, with the same results
> as yours. Kernel tuning, somaxconn, listen_depth, etc...
> In my case I was experiencing dropped connections, no
> or very delayed syn-ack packets from varnish server, random varnish
> restarts (crashes?), and sudden system load spikes,
> even as high as 200/300.
> The solution to this problem was really simple.
> Switch from the "file" allocation to "malloc".
> In the config file I had:
>   -s file,/var/lib/varnish/varnish.cache,20G
> and I changed it to:
>   -s malloc,20G
> I see you have 400G, so this solution won't probably work
> for you?, but my suggestion would be to at least try it
> with as much RAM as you have, to see if the issue disappears.
> Then you can setup some swap partition maybe.
> Check this mail,

Name: Joseph A. Williams
Email: joe at

More information about the varnish-misc mailing list