Slow connections

Cosimo Streppone cosimo at streppone.it
Mon Dec 28 21:45:10 CET 2009


On 28 Dec 2009 19:59:02, Joe Williams <joe at joetify.com> 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
> http://friendpaste.com/1Zvj1XkX75eKqdzrJQZcfK  and my sysctl changes
> http://friendpaste.com/3lt3uhIm1NTNhrqGxvQEX6 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,

http://www.mail-archive.com/varnish-misc@projects.linpro.no/msg01571.html

-- 
Cosimo



More information about the varnish-misc mailing list