Varnish burns the CPU and eat the RAM

thebog thebog at gmail.com
Thu Mar 3 18:11:10 CET 2011


The storage you are assigning is the storage for objects, not memoryspace.

When it comes to how much memory Varnish uses, it's assigned by the OS.
There is a big difference of how much is uses and how much it's
assigned by the OS (normally). Use the top command and read the
difference between whats actually used and how much is reserved.

Read: http://www.varnish-cache.org/docs/2.1/faq/general.html for more
info around that.
In short, Varnish is using modern OS technics to find the "right"
balance, and therefore memory should not be an issue.

The burning of CPU is not correct, but I don't have any good pointers
there. Join the irc channel, and ask if someone there can help you
out.

YS
Anders Berg

On Thu, Mar 3, 2011 at 5:57 PM, Romain LE DISEZ
<romain.ledisez at netensia.fr> wrote:
> Hello Martin,
>
> Le jeudi 03 mars 2011 à 11:01 +0100, Martin Boer a écrit :
>> Wat does happen when you limit the amount of memory/space used ? Say
>> something like
>>
>> -s file,/mnt/varnish/varnish_storage.bin,7G
>
> I did that :
>
> # free -m
>             total       used       free
> Mem:          7964        156       7807
> -/+ buffers/cache:        156       7807
>
> # /etc/init.d/varnish start
> Starting varnish HTTP accelerator:                         [  OK  ]
>
> # free -m
>             total       used       free
> Mem:          7964       5044       2920
> -/+ buffers/cache:       5044       2920
>
> # ps uax | grep varnish
> /usr/sbin/varnishd [...] -s file,/mnt/varnish/varnish_storage.bin,1G -p thread_pools 4
>
> Even with a limit of 1G, it consumes 5G of RAM. Could it be related to
> the number of thread ?
>
>
> --
> Romain LE DISEZ
>
>
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at varnish-cache.org
> http://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
>



More information about the varnish-misc mailing list