[squid-users] squid -k rec , seems has problem with ram leakage ?

Amos Jeffries squid3 at treenet.co.nz
Sat Feb 17 13:20:19 UTC 2018


On 18/02/18 00:57, --Ahmad-- wrote:
> hi amos 
> 
> i didnt use the version 3.5.22
> 
>  but long time I’m using the 3.5.22 and its fine 
> 
> the new thing is I’m using like 100 squid instances .
> 
> and  hourly i have cron to change and update squid 
> 
> so i just make rec option instead of having session drop .
> 
> i don’t have exact mount of statistics to tell you 
> 
> but say i have 32 G ram 
> 
> if i run 100 squid instances it take about 16 G ram .

So that is the amount before much traffic has happened.

When traffic goes through the proxy Squid gains data which uses more
memory for at least all the purposes listed at
<https://wiki.squid-cache.org/SquidFaq/SquidMemory>.


> 
> if i keep run the cron hourly by time say daily 12 times ( every 2 hours) 
> 
> and after 1 week i go to server to see free ram using :
> 
> free -m command
> 
> i see the free ram be like 5 G free , while I’m supposed to see the free
> as 16 G


+10GB for 100 instances means each is on average only using ~100 MB more
than you expected. This is also the net difference between when you
started the Squid and the peak traffic load within that whole week.

If you are not already graphing the memory usage I suggest you start
doing so and look at the graphs for patterns. They may show a different
story to what you (or I) are thinking is happening.


Also, Squid provides SNMP data for automated measurements if you want to
check the details rather than just the overall OS free measurement.

For example; comparing OID cacheMemUsage to cacheNumObjCount,
cacheClients and cacheCurrentFileDescrCnt shows roughly the relative
memory usage to each of the major dynamic memory consumers.


Amos


More information about the squid-users mailing list