Squid-2.1.PATCH2 dynamically allocated delay pools

From: David Luyer <luyer@dont-contact.us>
Date: Thu, 10 Dec 1998 21:40:40 +0800

This has now had some testing, and some bugs ironed out. It seems to be
working on a test machine, however I haven't put it into production use yet.

(there are a number of fixes in it since the version I sent to the squid-dev
list earlier, please use this version if you want to test/use/merge it)

[1] fixes no-delay in a sensible way (associates no-delay as a property of
     the server file descriptor, uses one global fd_set to store the info)
[2] adds the small feature I posted earlier - choosing if ident lookup should
     be done by simple ACL (ie, only lookup idents for connections from a set
     of hosts)
[3] fixes a small buglet - didn't delete "auth_modules/dummy" in a "make
     distclean"
[4] gets rid of the delay_id in the request_t, instead passing it as an
     option to sslStart and pumpInit, and in other places just getting it from
     the client http state
[5] sets the delay_id to 0 for urn's (it doesn't look like it worked anyway,
     maybe this needs fixing)
[6] changes a storeClientListAdd to an assert() that the client is already
     there in clientProcessExpired() - this looks like a valid assumption to
     me and makes things nice and simple for the delay code there
[7] removes superfluous memset()'s as posted to squid-bugs/squid-dev
[8] adds acl "myip" - which permits you to define different behaviour depending
     on the IP address used to access the cache
[9] adds NO_COMMENT sections to make sure all delay pools are disabled by
     default if build with DELAY_POOLS on
[10] fixes the behaviour of IP addresses with 255 and 0 in them (some people
     use strange netmasks...)
[11] configure.in bug fixed (shouldn't check for alloca.h separate to
     AC_FUNC_ALLOCA since the 2nd one will incorrectly use the cache value
     from the first)
[12] massive overhaul of delay pools code - dynamically allocated delay pools!
[13] delayPoolsUpdate even stops running if no delay pools configured, so
     there's now even less cost to leaving DELAY_POOLS configured but not in use
[14] in the cachemgr config dump, display passwords which are "none" or
     "disable" (the dummy passwords)

Apart from ironing out the bugs, that's about all I had in my squid todo list.

The patch is available (for the next couple of days at least) at:
  http://typhaon.ucs.uwa.edu.au/squid-diff-7.gz

Please send comments on it to me.

David.

PS: re: my squid 'todo' list...

The last two left are making squid use a non-constant scanning pattern for
the filedescriptors coming back from select() if DELAY_POOLS is defined and
making it log the incoming IP address of connections (to do with 'virtual
caches' which I will be running off the same real cache with different delay
behaviour and different billing rules - the reason for the 'myip' acls).

Possibly sufficient for the scanning order is to alternate between:

  forward scan
  reverse scan
  reverse scan odds then evens
  reverse scan evens then odds
  forward scan odds then evens
  forward scan evens then odds

In a 'fair' manner (not sure how).

This should be 'sufficiently random' given the file descriptor allocation
randomness of squid and the number of connections made on average by one
browser at one time. Obviously there are better scanning orders but this
is probably as good as I'd bother to get it.
Received on Tue Jul 29 2003 - 13:15:55 MDT

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