[squid-dev] [PATCH] external_acl_type cache=n docs

Alex Rousskov rousskov at measurement-factory.com
Thu Dec 31 03:43:44 UTC 2015


On 12/27/2015 05:36 PM, Amos Jeffries wrote:
> On 26/12/2015 11:15 a.m., Alex Rousskov wrote:
>>     The attached patch changes external_acl_type cache=n documentation
>> to better reflect the [ugly] reality. The patch does not change how the
>> cache works, but may help admins configure the cache correctly if they
>> stumble upon this documentation.

Committed to trunk (r14469).

>> A typical external ACL cache with the default cache settings consumes
>> about 70 MB of RAM (more in many cases, e.g., if annotations are used
>> with external ACLs). Besides memory usage, the default cache is using
>> only 977 hash buckets for 262144 entries so there may be quite a bit of
>> linear search going on by default.
>>
>> If you think the default limit should be changed, please say so or file
>> a bug report, but this specific patch is about fixing documentation only.


> Yes we need to fix the cache removal behaviour, and the buckets.

Agreed regarding buckets.

I am guessing that replacing easily-found expired entries instead of
just adding new ones would be good (assuming that does not happen now).
Beyond that, I am not sure the purging algorithm itself needs fixing
and/or is the root of the problem. I certainly do not want to see a yet
another "periodic cleanup" job in Squid.

It feels like the default cache capacity is wrong for many typical
setups. If we cannot simply reduce the default capacity, perhaps there
is a better way to auto-tune the cache size based on macros in FORMAT? I
cannot offer any specific ideas or fixes at this time though.


Thank you,

Alex.



More information about the squid-dev mailing list