here's the updated patch. As it reads, the hash allocation has been changed.
Shall I modify the patch to allow people to select a hash algorithm to use?
Or what? WCCP cluey people, speak up! :)
adrian
----- Forwarded message from Steven Wilton <steven.wilton@team.eftel.com> -----
Date: Fri, 16 Aug 2002 09:12:45 +0800
From: Steven Wilton <steven.wilton@team.eftel.com>
To: Adrian Chadd <adrian@creative.net.au>
Subject: Re: WCCP Patch (update)
X-Mailer: Balsa 1.2.4
Adrian,
The current patch that we use is attatched.
Steven
On Thu, 15 Aug 2002 17:31:41 Adrian Chadd wrote:
>On Thu, Aug 15, 2002, Steven Wilton wrote:
>> We were running 4 caches at the time (we now run 5), and I made the
>> changes to the hash allocation a few weeks after sending you the other
>> patch. The previous patch completely fixes the bug where the router
>stops
>> sending packets to a particular cache, so you can use the old patch to
>fix
>> the problem if it is easier.
>>
>> What we were seeing with the old hash allocation was a a 25-30%
>difference
>> between the number of packets sent to the two caches in the middle of
>the
>> hash and the two caches at the top and bottom of the caches. The new
>hash
>> allocation makes the difference between the busiest cache and the least
>
>> busy one about 10% on our system.
>
>Ah. Well, please, throw me the latest patch.
>I'm willing to do a bit of work to make it #ifdef'able.. :-)
>
>
>
>
>Adrian
>
>--
>Adrian Chadd "<WeBGrrL> i WAS a lesbian.....but
>now i love everyone :P"
><adrian@creative.net.au>
>
--- src/wccp.c Sat Feb 17 15:31:59 2001
+++ ../old/squid-2.4.4/src/wccp.c Tue May 21 14:04:09 2002
@@ -84,6 +84,7 @@
static struct wccp_here_i_am_t wccp_here_i_am;
static struct wccp_i_see_you_t wccp_i_see_you;
static int change;
+static int number_caches;
static struct in_addr local_ip;
static PF wccpHandleUdp;
@@ -233,7 +234,7 @@
return;
if (ntohl(wccp_i_see_you.type) != WCCP_I_SEE_YOU)
return;
- if (!change) {
+ if ((!change) && (number_caches == ntohl(wccp_i_see_you.number)) ) {
change = wccp_i_see_you.change;
return;
}
@@ -278,8 +279,6 @@
char *buckets;
int buckets_per_cache;
int loop;
- int number_caches;
- int bucket = 0;
int *caches;
int cache_len;
char *buf;
@@ -307,9 +306,9 @@
xmemcpy(&caches[loop],
&wccp_i_see_you.wccp_cache_entry[loop].ip_addr.s_addr,
sizeof(*caches));
- for (i = 0; i < buckets_per_cache; i++) {
- assert(bucket < WCCP_BUCKETS);
- buckets[bucket++] = loop;
+ for (i = loop; i < WCCP_BUCKETS; i += number_caches) {
+ assert(i < WCCP_BUCKETS);
+ buckets[i] = loop;
}
}
wccp_assign_bucket->type = htonl(WCCP_ASSIGN_BUCKET);
----- End forwarded message -----
-- Adrian Chadd "<WeBGrrL> i WAS a lesbian.....but now i love everyone :P" <adrian@creative.net.au>Received on Thu Aug 15 2002 - 19:27:11 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:16:05 MST