how to check whether varnish use memory for cache

Per Buer perbu at varnish-software.com
Thu Feb 16 11:25:15 CET 2012


On Thu, Feb 16, 2012 at 4:31 AM, Travis Crowder
<travis.crowder at spechal.com>wrote:

>  You can issue a ps auwx | grep varnish and look at the line for the
> process:
>
> /usr/sbin/varnishd -P /var/run/varnish.pid -a :80 -f
> /etc/varnish/default.vcl -T XX.XX.XX.XX:XX -t 120 -w 100,4000,120 -u
> varnish -g varnish -S /etc/varnish/secret -s malloc,2G
>
> This shows Varnish is using malloc and is allocated 2G of memory.
>

I just wanted to point out that -s malloc,2G allocated 2G of memory for
storing objects. There is some overhead in the data structures that is
allocated in addition to this, if needed. This overhead is dependant on the
number of objects kept in cache. AFAIK it is around 1-2K per object.


-- 
Per Buer
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/20120216/e4037966/attachment-0001.html>


More information about the varnish-misc mailing list