<div dir="ltr">Yeah I meant Very in response to requests I tried.<div><br></div><div>The fact that you can't reproduce it with this url and the fact that it affects mostly mp3/wav files gave me an idea.</div><div><br></div><div>Our env specific is squid's cache_peer parent which transcodes audio files to ulaw (format which our backend supports). This explains why audio files. Doesn't explain why it works with squid 3 non-shared memory and squid 4 shared-memory.</div><div><br></div><div>I verified direct request and memory cache works with squid 3 +shared memory.</div><div><br></div><div>The difference between direct and non-direct (transcoded) response for <a href="http://techslides.com/demos/samples/sample.mp3">http://techslides.com/demos/samples/sample.mp3</a>:</div><div><br></div><div>* "Content-Type: audio/mpeg" for direct, "Content-Type: audio/ulaw" for non-direct.</div><div>* No "Content-Length" header for non-direct.<br></div><div><br></div><div>What do you think? Could these 2 points lead to the issue I see? Why does it work in all situations except squid 3 + shared memory?</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 16, 2018 at 3:17 PM, 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/16/2018 02:40 PM, Ivan Larionov wrote:<br>
> So it's definitely not related to Vary, there's no such header in<br>
> requests I tried.<br>
<br>
</span>Just to avoid misunderstanding, please note that Vary is a response header.<br>
<span class=""><br>
<br>
> Also this issue affects squid even with 1 worker if<br>
> shared memory is forced to on.<br>
<br>
</span>This matches the current suspicion that there is something wrong with<br>
the shared memory cache (in your environment).<br>
<span class=""><br>
> It's not like it makes any sense but how about random example url:<br>
><br>
> <a href="http://techslides.com/demos/samples/sample.mp3" rel="noreferrer" target="_blank">http://techslides.com/demos/<wbr>samples/sample.mp3</a><br>
><br>
> squid 4, 2 workers, shared cache, no disk cache – MEM_HIT<br>
> squid 3, same config – MISS every time<br>
> squid 3, no shared cache – MEM_HIT<br>
><br>
> Could you do a brief test with this URL may be and confirm that I'm not<br>
> the only one who see this issue?<br>
<br>
</span>I cannot confirm that: In primitive wget tests with Squid v3.5 (bzr<br>
r14182), I am getting shared memory hits with the above URL, with or<br>
without cache_dirs, with or without SMP.<br>
<span class="HOEnZb"><font color="#888888"><br>
Alex.<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
> On Tue, Jan 16, 2018 at 6:25 AM, Alex Rousskov wrote:<br>
><br>
> On 01/15/2018 09:25 PM, Ivan Larionov wrote:<br>
> > My total hit ratio decreased in ~2 times from 40% to 20%<br>
><br>
> > 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>
> > > And disk cache hit ratio went up from 15-50% to stable 60-65%.<br>
><br>
><br>
> 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>
><br>
><br>
><br>
><br>
> --<br>
> With best regards, Ivan Larionov.<br>
<br>
</div></div></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>