Re: [squid-users] caching googlevideo.com with squid

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Wed, 1 Apr 2009 13:56:24 +1200 (NZST)

> Hi,
>
> running squid in transparent mode for our network, we're trying to
> maximised our byte cache hit ratio. Isn't everyone ;-)
>
> I've been looking over reports generated by SRG and I guess shouldn't be
> surprised to find that youtube/goodlevideo (when you add up the 250
> different mirror servers) accounts for around 15% of our bandwidth usage
> (c. 28GB per day in c. 300 requests) and has a 0% hit rate. This seems
> worthy of some effort.
>
> So, I've been looking at these pages:
>
> http://wiki.squid-cache.org/ConfigExamples/DynamicContent/YouTube
> http://wiki.squid-cache.org/ConfigExamples/DynamicContent/YouTube/Discussion
>
> I gather I'd need to upgrade to squid 2.7 (for storeurl) which I can do.
> The remainder looks doable, if a little complex.
>
> Is there a big performance hit involved in spawning the perl script? I
> guess those ACLs will get hit relatively rarely so perhaps not?

With a dual-core system the helpers usually run on a separarte CPU to
squid itself, so not much of a hit at all. The ACL processing happens
inside Squid so prefacing the regex tests with a dstdomain ACL to limit
their checking to only the right domains is a big performance boost.

The other post mentions speed limits around 600Mbps, but 2.7 is the
fastest Squid we have benchmarked at present. So if they are not an issue
with your current Squid setup the move will be a net performance gain over
what you currently have.

>
> I guess the perl script needs to be modified every time google/youtube
> change subdomain names. Do I presume this doesn't happen too often?

Correct. Sometimes the regex patterns change too.
In the 18 months or so this has been worked on has seen a total of one
pattern change at about the time when GoogleVideo completed their
integration with YouTube.

>
> Does anyone else have any experience or advice on this? What sort of hit
> rate do you tend to get in practice? There's a lot of video on
> goodlevideo, but I guess certain videos tend to become highly popular for
> a
> few days.
>

I don't do it here yet being on 3.1, but I'd expect less savings per hit
than some sites, but anything saved is better than 0%.

Amos
Received on Wed Apr 01 2009 - 00:56:29 MDT

This archive was generated by hypermail 2.2.0 : Wed Apr 01 2009 - 12:00:02 MDT