[squid-users] minimize squid memory usage

Amos Jeffries squid3 at treenet.co.nz
Tue Jul 10 07:06:00 UTC 2018


On 10/07/18 11:45, Gordon Hsiao wrote:
> I noticed my Squid doubles its memory usage even though I had:
> 

What do you mean by "double" ? Squid memory is mostly used for things
that are not caches.
 <https://wiki.squid-cache.org/SquidFaq/SquidMemory>

And be careful that you are looking at *resident* size, not virtual
memory or the areas the OS calls "cache" memory (which is not related to
Squid).


> cache deny all
> cache_mem 0 MB
> access_log none
> 
> Assuming I need _absolutely_ no cache what-so-ever(to the point to
> change compile flags to disable that, if needed), no store-to-disk
> neither, i.e. no objects need to be cached at all. I just need Squid to
> check a few ACLs with absolutely minimal memory usage for now, what else
> am I missing to get that work?


Start with a minimal build. The set of ./configure build options to
disable for small Squid binaries can be found at
<https://github.com/squid-cache/squid/blob/v4/test-suite/buildtests/layer-01-minimal.opts>

There are some other options not listed there (or listed at the top with
reasons stated) which can be disabled. However they or the replacement
code requires OS-specific support. If your OS has that, you can shrink
it a bit more.

When you have a minimal build look at what the memory if being used for
and tune further.


Amos


More information about the squid-users mailing list