Modular policy implementation

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Mon, 15 May 2000 02:07:22 +0200

A first try of implementing the removal policy API discussed earlier are
now available in the modio branch on cvs.sourceforge.net.

I need help in testing the various fs/policy combinations possible
before committing this to the main source tree.

How to get the sources if you don't have a SourceForge account:

  cvs -d pserver:anonymous@cvs.sourceforge.net:/cvsroot/squid login
  [blank password]
  cvs -z3 -d :pserver:anonymous@cvs.sourceforge.net:/cvsroot/squid co \
          -r modio -d squid-modio
  cd squid-modio
  autoconf
  autoheader
  cd icons
  unshar icons.shar
  cd ..

New configure option:

  --enable-removal-policies[="list policy implementation"]

Available policies:
   lru, heap

Another not new but equally important configure directives from modio:

  --enable-store-io[="list of FS implementations"]
  --with-pthreads (required by the aufs implementation)

An empty list includes all available implementations. (searches for
Makefile.in in the relevant subdirectories).

New squid.conf directives:

cache_replacement_policy <implementation> [<arguments>...]
memory_replacement_policy <implementation> [<arguments>...]

Available policies:

   lru
   heap GDSF
   heap LFUDA
   heap LRU

Note:
cache_replacement_policy must be specified PRIOR to the cache_dir lines
it applies to. Different specifications might be used for differen
cache_dir lines by having new cache_replacement_policu specification
inbetween the lines, but this is not something I would recommend other
than for testing purposes (the global policy for the cache gets a bit
diffuse if different policies are applied to different directories..)

The selected policy applies to all the filesystem based stores: ufs,
aufs, diskd.

The coss FS store uses it's own built in policy by design.
cache_replacement_policy does not apply to coss. coss can be seen as an
example of how a FS might select to implement a completely different
method for selecting when or how to remove objects.

So far only the "ufs/lru" combination is somewhat tested. Time has not
permitted me to test the other store drivers or policies yet, and I
probably won't find much time in the next 12 days or so.

/Henrik

Ps: If any of you are going to Lisbon for the wcw workshop, I will be
there Saturday to Thursday staying at Holiday Inn.
Received on Sun May 14 2000 - 18:09:54 MDT

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