<div dir="ltr">Hi there,<div><br></div><div>So, varnish memory usage will mostly come from three directions:</div><div>- 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).</div><div>- thread workspaces, one thread typically uses one workspace, so you can limit the number of threads, or reduce the workspace size</div><div>- memory fragmentation: jemalloc will fragment up to 25%, not much you can do here.</div><div><br></div><div>And no, no way to modify the mmap without restarting varnish.</div><div><br></div><div>May I ask how much data you are caching?</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>-- <br></div>Guillaume Quintard<br></div></div></div>
<br><div class="gmail_quote">On Wed, Feb 7, 2018 at 1:34 PM, Pinakee BIswas <span dir="ltr"><<a href="mailto:pinakee@waltzz.com" target="_blank">pinakee@waltzz.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<p>Hi,</p>
<p>We have been using varnish since more than a year for our
ecommerce site. <br>
</p>
<p>Current version is 4.1.8.</p>
<p>OS is Linux. RAM is 8GB. <br>
</p>
<p>I am observing that the varnish memory usage is increasing (right
now 7%) and so is resident memory usage increasing. <br>
</p>
<p>The storage being used is file:</p>
<p>-s file,/tmp/varnish/,${storage}</p>
<p>I am not sure about the reason for the increase in varnish memory
usage:</p>
<ul>
<li>Is there a way to limit the varnish memory usage?</li>
<li>How can I diagnose what is consuming memory?</li>
<li>Most of our web pages have maximum 2 days of cache. Also, some
of the pages might be least visited.</li>
<li>Is there a way to manipulate varnish mmap (when file storage
is used)?</li>
</ul>
<p>Would appreciate any help on the above for efficient use of
varnish.</p>
<p>Thanks,</p>
<p>Pinakee<br>
</p>
<p><br>
</p>
</div>
<br>______________________________<wbr>_________________<br>
varnish-misc mailing list<br>
<a href="mailto:varnish-misc@varnish-cache.org">varnish-misc@varnish-cache.org</a><br>
<a href="https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc" rel="noreferrer" target="_blank">https://www.varnish-cache.org/<wbr>lists/mailman/listinfo/<wbr>varnish-misc</a><br></blockquote></div><br></div>