Another COSS patch

From: Steven <swilton@dont-contact.us>
Date: Mon, 14 Aug 2006 16:37:19 +0800 (WST)

Ar there any objections to me committing the attached patch for COSS in
squid 2.6. I've been running this patch for the past week on one of our
caches, and it appears to be working well.

This patch adds an option to specify the maximum number of disk buffers
for COSS to use. With this new code, the COSS buffer management will work
in one of the following ways:
 
1 - Under normal conditions nothing changes from the old code
2 - If the 'memonly' buffers (hits) are all in use, COSS will now relocate
the object to the disk head (and a message is logged to the cache
log). This will cause a slight improvement in the hit rate, and will
avoid a swapin failure where possible.
3 - If the maximum number of in-memory disk stripes is specified, COSS
will use this as part of the load calculation. If there are only 1 or 2
stripes available, no new objects will be stored in the COSS cache_dir,
and a message is logged to the cache log. Once again, this is designed to
avoid swapin failures where possible.
4 - If all disk and memory stripes are full, no objects will be stored or
retrieved from the cache dir until one becomes available.

 
This keeps COSS in line with other behaviours of squid to stop clients
from being able to cause squid to use excessive amounts of memory.

regards

Steven

Received on Mon Aug 14 2006 - 02:37:25 MDT

This archive was generated by hypermail pre-2.1.9 : Fri Sep 01 2006 - 12:00:03 MDT