[squid-users] refresh_pattern and same objects
Amos Jeffries
squid3 at treenet.co.nz
Wed Sep 2 17:10:08 UTC 2015
On 3/09/2015 12:23 a.m., Yuri Voinov wrote:
>
> Look at this:
>
> http://i.imgur.com/gbkU20r.png
>
> Pay your attention to reply times. With hit ratio not above 30% will
> also occurs unacceptable delays on clients.
>
> So, I see no reasons to have cache with low hit ratio in any case. IMHO
> need to tune cache more accurate to achieve maximum possible hit ratio.
Those numbers are contradicting your earlier statement "It's enough to
buy more external throuthput."
What they are showing is that your direct traffic has a horribly slow
multi-second delay. If you remove the cache and pay for external
throughput all traffic will face that delay.
If you put a cache into slow traffic like that and it gets even a tiny
1% improvement you are already gaining both latency and bandwidth savings.
Think about:
1% of traffic going 10x faster ... vs 100% going slow.
-> 109% normal speed
10% of traffic going 10x faster ... vs 100% going slow.
-> 190% normal speed
30% of traffic going 10x faster ... vs 100% going slow.
-> 370% normal speed
90% of traffic going 10x faster ... vs 100% going slow.
-> 910% normal speed
Yes bigger % caching is better speedup. Thats why we all aim for it. But
*any* amount is more than nothing.
Integrity of the output is also critical on HITs. If the cache returns
incorrect responses like the .GIF Marcus mentioned, it forces recipients
to reload content and raises all the resource costs.
Consider if that gif?something URL was a Captcha. By sending the wrong
one your cache is making the user auth checks fail. They are then forced
to repeat the whole page load, possibly several times, possibly with
force-refresh. The *entire* page and everything embedded, not just the
one small gif. Besides which your cache service looks a little bit worse
in the eyes of one more pissed off user.
When something is a protocol violation there are good reasons for it. At
least some uses cases exist where that thing is a Very Bad idea. You are
just trading off the chance that those situations are rare in your users
traffic against some savings in what for you are more common cases. This
is very much a personal situation, it varies by network and over time.
Going all-out on HIT rate is not a clear-cut as you seem to think. A lot
of it is choices to trade one gain for another.
Amos
More information about the squid-users
mailing list