[squid-users] cache_mem differs from output in mgr:config

Amos Jeffries squid3 at treenet.co.nz
Tue Jan 12 22:18:13 UTC 2016


On 12/01/2016 2:36 p.m., XUFENG wrote:
> My squid's cache_mem in squid.conf differs from output in mgr:config.
> 
...
> 
> Anything wrong? 

Just a bug in the mgr report display code I think. There are some others
known as well. The reporter code has often been overlooked by people
changing the squid.conf parser.

Your config file looks fine, and should be running with the values you
configured.


Some notes on what you could do to improve your squid.conf:

> unique_hostname squid-cache.xufeng.info
> visible_hostname squid-cache.xufeng.info

unique_hostname default value is to copy the visible_hostname. So you
can remove it when the two are identical like this.

Also, you only need to configure the visible_hostname line if Squid is
unable to locate the machine hostname automatically, or if it differs
from the name you want to publish publicly. You may want to experiment
with that.


> acl PURGE method PURGE
> http_access allow PURGE localhost
> http_access deny PURGE

If you can avoid PURGE entirely (including the acl line above) Squid
will be able to operate a bit more efficiently by disabling the feature.

Your config is not doing anything special with refresh_pattern overrides
that would make PURGE necessary. So you (and your visitors) can use the
browser refresh button (reload requests) instead of the special PURGE
method to fix any broken content identified.


> cache_effective_user squid
> cache_effective_group squid

If you can avoid configuring these manually it is a good idea to remove
them.
 * The default cache_effective_group is to use the group(s) the OS has
membership assigned for the cache_effective_user.
 (eg with command line "adduser squid squid")

 * The default cache_effective_user can be built into Squid using the
build parameter:  --with-default-user=squid


> cache_peer 10.1.6.38 parent 80 0 no-query originserver round-robin
name=server_xufeng_info

You may want to also set the no-netdb-exchange and no-digest options if
your Squid accepts them.


Amos


More information about the squid-users mailing list