[squid-users] Squid high memory usage

FredB fredbmail at free.fr
Mon Jun 6 10:27:39 UTC 2016

Thanks for your answer

> What is cache_mem ?
> See also http://wiki.squid-cache.org/SquidFaq/SquidMemory

Actually 25 Gb
I tried different values, but I guess no matter, the problem is that the squid limit is only 50% of ram

> > After that the swap is totally full and kswap process gone mad ...
> > I tried with vm.swappiness = 0 but same problem, perhaps a little
> > better, I also tried memory_pool off without any change.
> I recommend vm.swappiness = 5 to have 5% of the memory be used for
> the file system cache and maintain good disk I/O.

More I increase vm.swappiness more I swap and more I have problems, but I will try your value

> The values are too high (1024 times).  I think that you incorrectly
> set cache_mem.
> Start with setting  cache_mem to 16 GB

Maybe I misunderstand your point, but when I reduce cache_mem yes there is no problem but Squid uses only 20/30 Go Max

With cache_men 15 Gb squid eats 36 % of memory
Htop and htops reports 30 Go of free memory

free -h
             total       used       free     shared    buffers     cached
Mem:           63G        62G       425M       122M       1,7G        27G
-/+ buffers/cache:        33G        30G
Swap:         1,9G       102M       1,8G

All my RAM is consumed by cache/buffers and seems not be freed when it is needed by Squid  

More information about the squid-users mailing list