Varnish Memory usage increase

Guillaume Quintard guillaume at varnish-software.com
Wed Feb 7 12:51:19 UTC 2018


Hi there,

So, varnish memory usage will mostly come from three directions:
- storage, include Transient, so check the g_bytes fields in varnishstat.
Passes and shortlived objects will use Transient, so you can either reduce
those, or limit the Transient storage (unbounded by defaukt).
- thread workspaces, one thread typically uses one workspace, so you can
limit the number of threads, or reduce the workspace size
- memory fragmentation: jemalloc will fragment up to 25%, not much you can
do here.

And no, no way to modify the mmap without restarting varnish.

May I ask how much data you are caching?

-- 
Guillaume Quintard

On Wed, Feb 7, 2018 at 1:34 PM, Pinakee BIswas <pinakee at waltzz.com> wrote:

> Hi,
>
> We have been using varnish since more than a year for our ecommerce site.
>
> Current version is 4.1.8.
>
> OS is Linux. RAM is 8GB.
>
> I am observing that the varnish memory usage is increasing (right now 7%)
> and so is resident memory usage increasing.
>
> The storage being used is file:
>
> -s file,/tmp/varnish/,${storage}
>
> I am not sure about the reason for the increase in varnish memory usage:
>
>    - Is there a way to limit the varnish memory usage?
>    - How can I diagnose what is consuming memory?
>    - Most of our web pages have maximum 2 days of cache. Also, some of
>    the pages might be least visited.
>    - Is there a way to manipulate varnish mmap (when file storage is
>    used)?
>
> Would appreciate any help on the above for efficient use of varnish.
>
> Thanks,
>
> Pinakee
>
>
>
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20180207/6038a3c9/attachment.html>


More information about the varnish-misc mailing list