]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Reflect the [ugly] reality in external_acl_type cache=n documentation.
authorAlex Rousskov <rousskov@measurement-factory.com>
Thu, 31 Dec 2015 03:32:59 +0000 (20:32 -0700)
committerAlex Rousskov <rousskov@measurement-factory.com>
Thu, 31 Dec 2015 03:32:59 +0000 (20:32 -0700)
The patch does not change how the cache works, but may help admins
configure the cache correctly if they stumble upon the updated docs.

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.

src/cf.data.pre

index 94c4188ae85bbc093c1e967700ff2316a43b8993..f4b6f4e5824033d1f2b86377f8ecfaac804eeecf 100644 (file)
@@ -727,10 +727,14 @@ DOC_START
                        cached entry should be initiated without needing to
                        wait for a new reply. (default is for no grace period)
 
-         cache=n       Limit the result cache size, default is 262144.
-                       The expanded FORMAT value is used as the cache key, so
-                       if the details in FORMAT are highly variable a larger
-                       cache may be needed to produce reduction in helper load.
+         cache=n       The maximum number of entries in the result cache. The
+                       default limit is 262144 entries.  Each cache entry usually
+                       consumes at least 256 bytes. Squid currently does not remove
+                       expired cache entries until the limit is reached, so a proxy
+                       will sooner or later reach the limit. The expanded FORMAT
+                       value is used as the cache key, so if the details in FORMAT
+                       are highly variable, a larger cache may be needed to produce
+                       reduction in helper load.
 
          children-max=n
                        Maximum number of acl helper processes spawned to service