Re: [squid-users] WCCP becomes unusable

From: Gergely Madarasz <gorgo@dont-contact.us>
Date: Wed, 13 Feb 2002 14:22:42 +0100 (MET)

On Tue, 12 Feb 2002, Adrian Chadd wrote:

> On Wed, Feb 13, 2002, Awie wrote:
>
> > Does someone have experience for that problem? Your answer is very appreciated and waited for. Many thanks for your help.
>
> Again, there's a known problem or two with squid's wccp1 code.
> This kind of problem (squid not being in the hash bucket at all)
> has been pointed at before, but .. well, I haven't been able
> to reproduce it at home so I can't easily fix it.

I have experienced the problem quite a few times. It seems that sometimes
the cisco router loses the proxy server for a few seconds (it happened
quite often while one of our routers was overloaded, proc over 99%) and
squid doesn't get notified correctly about the second change so it does
not reconfigure the hash buckets (for example the router loses proxy4 ,
proxy1 gets notified about the first change, configures the hash without
proxy4, then proxy4 comes back, and either proxy1 doesn't get correctly
notified about the change or proxy1 doesn't correctly parse this
notification, so no reconfiguration happens). I really needed a fix for
this, or at least a workaround, so I modified the wccp code to reconfigure
the hash each 15 minutes (more exactly each 180 iseeyou messages :)), no
matter what happens.

Oh, and another wccp based modification I have made here: I have four
proxies in a setup, and the traffic was distributed quite unevenly, the
top proxy getting 3 times as much traffic as the lowest one. I modified
the hash generation to distribute the hash by bits, not by blocks of bits,
so instead of F000 / 0F00 / 00F0 / 000F I have 1111 / 2222 / 4444 / 8888.
I don't know how cisco distributes the ip addresses using the hash, but
having the second pattern it seems to do a better job (it probably has to
do with the fact that here in .hu there are a few sites which generate
quite a large part of the traffic, and they might be close to each other
in the hash).

Oh and this hash distribution has the advantage of not having unassigned
hash buckets in the case when there are 3/5/6/7/etc proxies :)
It looks like this:

    for (i = 0; i < WCCP_BUCKETS; i++) {
        buckets[i]=i % number_caches;
    }

I think there might be a problem with this with poor cache locality if one
of the servers fail (the hash gets quite reorganized).

-- 
Madarasz Gergely          gorgo@sztaki.hu          gorgo@linux.rulez.org
    It's practically impossible to look at a penguin and feel angry.
        Egy pingvinre gyakorlatilag lehetetlen haragosan nezni.
                  HuLUG: http://mlf.linux.rulez.org/
Received on Wed Feb 13 2002 - 06:22:49 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:06:16 MST