<div dir="ltr">So it's definitely not related to Vary, there's no such header in requests I tried. Also this issue affects squid even with 1 worker if shared memory is forced to on.<div><br></div><div>Interesting thing I noticed is that according to log file a lot of images are actually cached in memory but sound files are not (mp3/wav). It's not like it makes any sense but how about random example url:</div><div><br></div><div><a href="http://techslides.com/demos/samples/sample.mp3">http://techslides.com/demos/samples/sample.mp3</a></div><div><br></div><div>squid 4, 2 workers, shared cache, no disk cache – MEM_HIT</div><div>squid 3, same config – MISS every time</div><div>squid 3, no shared cache – MEM_HIT</div><div><br></div><div>Could you do a brief test with this URL may be and confirm that I'm not the only one who see this issue?</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 16, 2018 at 6:25 AM, Alex Rousskov <span dir="ltr"><<a href="mailto:rousskov@measurement-factory.com" target="_blank">rousskov@measurement-factory.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 01/15/2018 09:25 PM, Ivan Larionov wrote:<br>
</span><span class="">> My total hit ratio decreased in ~2 times from 40% to 20%<br>
<br>
</span><span class="">>     On 01/14/2018 10:53 PM, Ivan Larionov wrote:<br>
><br>
>     > After migrating squid from non-SMP/aufs to SMP/rock memory cache hit<br>
>     > ratio dropped significantly. Like from 50-100% to 1-5%.<br>
><br>
</span><span class="">>     > And disk cache hit ratio went up from 15-50% to stable 60-65%.<br>
<br>
<br>
</span>The combination of the three statements above may be a sign of a problem<br>
unrelated to Vary: Since the disk cache can cache everything the memory<br>
cache can and is typically much larger than the memory cache, the<br>
incapacitation of a memory cache (due to Vary) should not have a<br>
significant effect on overall hit ratio. It should only affect hit<br>
response time.<br>
<br>
The only known culprit I can think of in this context are hits for<br>
being-cached objects: Rock lacks code that allows Squid to read<br>
being-written objects. The shared memory cache has that code already. If<br>
your workload has a lot of cases where clients request a being-written<br>
object, then the overall hit ratio should go down after the memory cache<br>
incapacitation (due to Vary).<br>
<br>
I suspect something else is in play here though, especially if you see a<br>
different picture with Squid v4 -- the known problem discussed above is<br>
present in all Squid versions. I second Amos's recommendation to focus<br>
on v4 because it is unlikely that any complicated problems are going to<br>
be fixed in v3, even if you triage them well.<br>
<br>
<br>
HTH,<br>
<br>
Alex.<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">With best regards, Ivan Larionov.</div>
</div>