varnishd invoked oom-killer

Per Buer perbu at varnish-software.com
Thu Aug 11 16:40:26 CEST 2011


Hi Pierig,


On Wed, Aug 10, 2011 at 3:49 PM, Pierig Le Saux <pierig56 at gmail.com> wrote:

> Hello,
>
> I am fairly new to varnish, and am trying to troubleshoot some sort of
> memory leak I have with varnishd.
>
> The server used is a vmware guest with dual cpu and 5gigs of ram. The
> traffic it handles is around 20Mbits, and it achieves a cache hit rate of
> approximately 40%.
>

Rigth. I see you run with 3GB of memory allocated to malloc.


As you can see in the following vcl, we are using an in house module that
> checks for tokens - However if we bypass the module, we still have the out
> of memory problem.
>
> I have tried varnish 3beta1,3beta2, 3.0-1  and even svn version from
> 20110808.
>
> I am certain it is only a configuration mistake, since many of you out
> there aren't facing memory leak issues.
>

Actually I think it is a configuration issue. First, the OOM killer can be
quite aggressive. You might be running low on swap space and so the OOM
killer will kill Varnish the moment it fails to allocate any memory instead
of pushing the unused bits of Varnish out onto swap. So, dramatically
increasing swap space will make the problem a lot less painfull. Paging is
still painful, however, and you should reduce the memory allocated to
Varnish to the moment where you no longer are swapping (much).

Depending on what sort of data you're putting into Varnish a lot of memory
can be allocated in addition to what you give to -s malloc. So, I suggest
you add memory to the server or reduce the amount given to -s malloc.


-- 
Per Buer, CEO
Phone: +47 21 98 92 61 / Mobile: +47 958 39 117 / Skype: per.buer
*Varnish makes websites fly!*
Whitepapers <http://www.varnish-software.com/whitepapers> |
Video<http://www.youtube.com/watch?v=x7t2Sp174eI> |
Twitter <https://twitter.com/varnishsoftware>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20110811/dd669dca/attachment-0003.html>


More information about the varnish-misc mailing list