wccp2

2006-04-17 Thread Adrian Chadd
Everyone,

I've decided to tidy up the wccp2 code and get it import-ready
for squid-2. My aims:

* configurable standard and dynamic services
* handle multiple routers
* stay sane during a cache configuration reload

I'm basing it on Steven Wiltons code in our monotone repository
(http://www.cacheboy.net/).

So far I have:

* configurable standard services
* framework for dynamic services
* multiple router support; this was already completed by Steven
  and I believe he has this bit in production

So the bits left:

* finish the dynamic service configuration options
* spend some time thinking about what should happen during a cache
  configuration reload
* dump the config out properly through cachemgr

Anyone is welcome to contribute; the code can be found in my
branch (net.cacheboy.squid.adrian). I'll hold back from merging it into
net.cacheboy.squid until its at least stable in my current home
setup (A couple of machines behind a Cisco 2651 speaking WCCP2.)





Adrian



Re: problems with the squid-2.5 connection pinning

2006-04-17 Thread Steven Wilton
- Original Message - 
From: Henrik Nordstrom [EMAIL PROTECTED]

To: Steven Wilton [EMAIL PROTECTED]
Cc: squid-dev@squid-cache.org
Sent: Saturday, April 15, 2006 11:15 PM
Subject: Re: problems with the squid-2.5 connection pinning

lör 2006-04-15 klockan 09:10 +0800 skrev Steven Wilton:


Having seen your patch, I've added the Proxy-Support: headers, and also
added a pinning flag to the request-flags struct to allow 
identification

of a pinned connection.


Looking at your patch I think you got the logics slightly wrong when
adding the flag.

Pinning is a property of the connections, not the individual requests.
From the point where the server connection has indicated use of
Microsoft authentication scheme the server-side connection should be
exclusively reserved for the specific client connection, and requests
from the same client connection should be handled both as pinned looking
for a matching reserved server connection and as authenticated even if
there is no Authorize header (Microsoft authentication only sends
Authorize headers on the first request on the connection, subsequent
requests automatically inherit the same credentials)


Hmm, you're right.  I'll follow the example in your patch to mark the client 
connection as pinned, and use this information to modify the pconn key.


Regards
Steven 



AC_LTDL_DLLIB

2006-04-17 Thread Robert Collins
anyone remember what this call in configure.in was for? It seems to be
not present on current autoconf + libtool.

--- configure.in21 Mar 2006 23:15:19 -  1.402
+++ configure.in17 Apr 2006 11:47:41 -
@@ -32,7 +32,6 @@ AC_PROG_CXX
 AC_CANONICAL_HOST
 AC_DISABLE_SHARED
 AC_PROG_LIBTOOL
-AC_LTDL_DLLIB
 AC_PROG_RANLIB
 
 

-- 
GPG key available at: http://www.robertcollins.net/keys.txt.


signature.asc
Description: This is a digitally signed message part


Re: wccp2

2006-04-17 Thread Adrian Chadd
On Mon, Apr 17, 2006, Adrian Chadd wrote:

 So the bits left:
 
 * finish the dynamic service configuration options
 * spend some time thinking about what should happen during a cache
   configuration reload
 * dump the config out properly through cachemgr

* dynamic service option is now implemented
* It hasn't been tested yet but the cache does associate to the
  router
* the rebuild logic still hasn't been implemented; thats a
  next week job.




Adrian



Re: problems with the squid-2.5 connection pinning

2006-04-17 Thread Steven Wilton


- Original Message - 
From: Henrik Nordstrom [EMAIL PROTECTED]

To: Steven Wilton [EMAIL PROTECTED]
Cc: squid-dev@squid-cache.org
Sent: Saturday, April 15, 2006 11:15 PM
Subject: Re: problems with the squid-2.5 connection pinning


lör 2006-04-15 klockan 09:10 +0800 skrev Steven Wilton:


Having seen your patch, I've added the Proxy-Support: headers, and also
added a pinning flag to the request-flags struct to allow 
identification

of a pinned connection.


Looking at your patch I think you got the logics slightly wrong when
adding the flag.

Pinning is a property of the connections, not the individual requests.
From the point where the server connection has indicated use of
Microsoft authentication scheme the server-side connection should be
exclusively reserved for the specific client connection, and requests
from the same client connection should be handled both as pinned looking
for a matching reserved server connection and as authenticated even if
there is no Authorize header (Microsoft authentication only sends
Authorize headers on the first request on the connection, subsequent
requests automatically inherit the same credentials)


Thanks for pointing this out.  I've updated the pinning patch to fix this 
problem, and tested on my home connection.  I can confirm that it works for 
a simple http GET command, and I'll do further testing and update this list 
with the results using frontpage (which uses a variety of other http methods 
to transfer data).


Due to other changes in the squid source, I needed to set the 
must_keepalive flag on the request to stop squid from closing the 
client-side connection, and I also had to remove the Connection: 
Proxy-support header from being sent back to the client (this caused IE to 
get really confused).


regards

Steven



pinning.patch
Description: Binary data


Re: Hi there

2006-04-17 Thread Adrian Chadd
I approved your subscription. Welcome to the fold!




adrian

On Tue, Apr 18, 2006, Doug Dixon wrote:
 Hi all
 
 I've been a user of Squid for a few years now, and am interested in  
 devoting some time to Squid-3.0 development, bugfixing and testing.
 
 I'd be most interested in helping to get the 3.0 branch up to the  
 next PRE and STABLE, but obviously there will be some more feature  
 development.
 
 In terms of features, I'm interested in helping with the reverse  
 proxy stuff, e.g. collapsed forwarding etc.
 
 Hopefully you'll let me join the squid-dev mailing list which would  
 be a good starting point :)
 
 Cheers
 Doug


Re: AW: [squid-users] Howto Clear Cache Periodicaly

2006-04-17 Thread nonama
HI, 
My select loop called average time is already about
50ms, with only 20 users. Where/How should I fine
tune?
FYI, I'm having 2 X 25GB cache_dir now with only 3%
currently filled up. I'm going to put about 400 users
more later. here is the cache mgr output. Kindly let
me know which to be monitored and any suggestion on
the baseline. Thank you so much..

Connection information for squid:
Number of clients accessing cache:  20
Number of HTTP requests received:   31772
Number of ICP messages received:0
Number of ICP messages sent:0
Number of queued ICP replies:   0
Request failure ratio:   0.00
Average HTTP requests per minute since start:   22.0
Average ICP messages per minute since start:0.0
Select loop called: 1480208 times, 58.636 ms avg
Cache information for squid:
Request Hit Ratios: 5min: 0.0%, 60min: 16.7%
Byte Hit Ratios:5min: 4.8%, 60min: 6.9%
Request Memory Hit Ratios:  5min: 0.0%, 60min: 0.0%
Request Disk Hit Ratios:5min: 0.0%, 60min: 2.4%
Storage Swap size:  1924632 KB
Storage Mem size:   7020 KB
Mean Object Size:   31.68 KB
Requests given to unlinkd:  414
Median Service Times (seconds)  5 min60 min:
HTTP Requests (All):   0.61549  0.61549
Cache Misses:  0.61549  0.72387
Cache Hits:0.0  0.00307
Near Hits: 0.0  0.58309
Not-Modified Replies:  0.0  0.00194
DNS Lookups:   0.0  0.0
ICP Queries:   0.0  0.0
Resource usage for squid:
UP Time:86794.142 seconds
CPU Time:   47.467 seconds
CPU Usage:  0.05%
CPU Usage, 5 minute avg:0.01%
CPU Usage, 60 minute avg:   0.01%
Process Data Segment Size via sbrk(): 16552 KB
Maximum Resident Size: 0 KB
Page faults with physical i/o: 0
Memory usage for squid via mallinfo():
Total space in arena:   16552 KB
Ordinary blocks:16415 KB 85 blks
Small blocks:   0 KB  0 blks
Holding blocks:  1228 KB  2 blks
Free Small blocks:  0 KB
Free Ordinary blocks: 136 KB
Total in use:   17643 KB 99%
Total free:   136 KB 1%
Total size: 17780 KB
Memory accounted for:
Total accounted:12856 KB
memPoolAlloc calls: 5633363
memPoolFree calls: 5415605
File descriptor usage for squid:
Maximum number of file descriptors:   1024
Largest file desc currently in use: 21
Number of file desc currently in use:   16
Files queued for open:   0
Available number of file descriptors: 1008
Reserved number of file descriptors:   100
Store Disk files open:   0
Internal Data Structures:
 60840 StoreEntries
  1465 StoreEntries with MemObjects
  1463 Hot Object Cache Items
 60759 on-disk objects


--- Adrian Chadd [EMAIL PROTECTED] wrote:

 On Thu, Apr 13, 2006, nonama wrote:
  Hi, 
  Thank you for your help. Can you let me know on
 other
  setting baseline that I should look into using the
  cache manager? i.e Select loop called average
 time -
  should be under
  20 milliseconds ,  in order for me to monitor my
 squid
  performance?
 
 Thats just one indication that squid is taking too
 long doing stuff
 to adequately service network requests. It'll
 increase quite quickly
 under load if your running short of CPU cycles.
 
 There's other variables you want to look at. The
 request rate is a good
 place to start. What is it at?
 
 
 
 adrian
 
 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


Re: AC_LTDL_DLLIB

2006-04-17 Thread Mr E_T
On Monday 17 April 2006 19:50, Robert Collins wrote:
 anyone remember what this call in configure.in was for? It seems to be
 not present on current autoconf + libtool.
 
 --- configure.in21 Mar 2006 23:15:19 -  1.402
 +++ configure.in17 Apr 2006 11:47:41 -
 @@ -32,7 +32,6 @@ AC_PROG_CXX
  AC_CANONICAL_HOST
  AC_DISABLE_SHARED
  AC_PROG_LIBTOOL
 -AC_LTDL_DLLIB
  AC_PROG_RANLIB
Its for dynamicly loadable libraries/modules/plugins.
Its part of libtool and is present in libtool-1.5.10 and libtool-1.5.22
It exists in an aclocal file - ltdl.m4
-- 
regs MR E_T
___
\  \
 \   OOHH I hate TYPOS  \
  \  \
   


wccp2 and squid reload semantics

2006-04-17 Thread Adrian Chadd
Hiya,

I've completed the WCCP2 configuration changes. Here's an example setup
from the cachemgr config output:

wccp2_router 192.168.2.2:2048
wccp2_version 4
wccp2_forwarding_method 1
wccp2_return_method 1
wccp2_service dynamic 80
wccp2_service standard 0
wccp2_service_info 80 priority=240 flags=src_ip_hash,ports_defined 
ports=80,81,82,83 protocol=tcp
wccp2_incoming_address 0.0.0.0
wccp2_outgoing_address 255.255.255.255

(Its a bit redundant, but you get the idea.)

What should the cache reload semantics be when Squid is reloaded?
Should I just start sending the updated here_i_am messages and let
the routers sort everything out? Or is there a better way to handle
this?




Adrian



Re: wccp2 and squid reload semantics

2006-04-17 Thread Henrik Nordstrom
tis 2006-04-18 klockan 10:49 +0800 skrev Adrian Chadd:

 What should the cache reload semantics be when Squid is reloaded?
 Should I just start sending the updated here_i_am messages and let
 the routers sort everything out? Or is there a better way to handle
 this?

It's probably possible to do it smart, but it's sorted out
automatically pretty quickly so there is not much to gain from trying to
be smart, at least not compared to the complexity to get it correct..

I guess it would be possible without too much effort to keep an MD5
checksum or similar of the wccp2 config section, and only restart the
WCCP if there has actually been any relevant configuration changes..

Regards
Henrik


signature.asc
Description: Detta är en digitalt signerad	meddelandedel


Re: wccp2 and squid reload semantics

2006-04-17 Thread Adrian Chadd
Hm, reading the IETF draft again does show a shutdown command which
we should probably send if we've removed a service/router.





adrian

On Tue, Apr 18, 2006, Henrik Nordstrom wrote:
 tis 2006-04-18 klockan 10:49 +0800 skrev Adrian Chadd:
 
  What should the cache reload semantics be when Squid is reloaded?
  Should I just start sending the updated here_i_am messages and let
  the routers sort everything out? Or is there a better way to handle
  this?
 
 It's probably possible to do it smart, but it's sorted out
 automatically pretty quickly so there is not much to gain from trying to
 be smart, at least not compared to the complexity to get it correct..
 
 I guess it would be possible without too much effort to keep an MD5
 checksum or similar of the wccp2 config section, and only restart the
 WCCP if there has actually been any relevant configuration changes..
 
 Regards
 Henrik




Re: AC_LTDL_DLLIB

2006-04-17 Thread Robert Collins
On Tue, 2006-04-18 at 09:13 +0800, Mr E_T wrote:
 On Monday 17 April 2006 19:50, Robert Collins wrote:
  anyone remember what this call in configure.in was for? It seems to be
  not present on current autoconf + libtool.
  
  --- configure.in21 Mar 2006 23:15:19 -  1.402
  +++ configure.in17 Apr 2006 11:47:41 -
  @@ -32,7 +32,6 @@ AC_PROG_CXX
   AC_CANONICAL_HOST
   AC_DISABLE_SHARED
   AC_PROG_LIBTOOL
  -AC_LTDL_DLLIB
   AC_PROG_RANLIB
 Its for dynamicly loadable libraries/modules/plugins.
 Its part of libtool and is present in libtool-1.5.10 and libtool-1.5.22
 It exists in an aclocal file - ltdl.m4

ah, I was missing a new split out package, libltdl3-dev on debian
derived systems.

Cheers,
Rob

-- 
GPG key available at: http://www.robertcollins.net/keys.txt.


signature.asc
Description: This is a digitally signed message part


Re: wccp2 and squid reload semantics

2006-04-17 Thread Adrian Chadd
On Tue, Apr 18, 2006, Henrik Nordstrom wrote:

 Not critical on reconfigure, as we still most likely still accept
 redirected traffic and the router will automatically take us offline
 after a short while.
 
 What is more important is to send the shutdown event when Squid is
 actually shut down.. this to promptly make the router not direct any
 traffic to us.

Thats not a bad thing to do actually. I'll go and add that in.



Adrian