[squid-users] Why `Storage Mem capacity` has a value larger than 100%.

kmiku7 kakoimiku at gmail.com
Wed Jul 31 03:23:06 UTC 2019


Amos Jeffries wrote
> On 29/07/19 2:46 pm, kmiku7 wrote:
>> Hello
>> My squid consume too much memory at startup time grow.
>> From manager cgi /squid-internal-mgr/info, I saw the `Storage Mem
>> capacity`
>> in Cache information for squid is 2429.7%, larger than 100%. In my
>> opinion,
>> this value should be less or equal to 100%. I have searched but find
>> nothing
>> about it.
>> Can someone tell me why? And how to limit squid memory usage, to avoid
>> memory grow as startup time grow and handle more and more request.
> 
> The numbers in these reports can get a bit weird if you are running a
> 32-bit build of Squid on a 64-bit system, or just with very large sizes
> for some things like cache.
> 
> When the value seems absurd like this use an external tool such as 'top'
> to see if Squid is actually using as much memory as claimed.
> 
> If you have SMP workers configured then shared memory not working
> properly could result in excessive memory usage across all of them.
> 
> 
> Also, your proxy is apparently trying to fit objects with an *average*
> size exceeding 70MB into that 256MB of cache. The bit of the report you
> elided shows how many it is trying to fit in there.
> 
> 
> Amos
> _______________________________________________
> squid-users mailing list

> squid-users at .squid-cache

> http://lists.squid-cache.org/listinfo/squid-users

Thanks your reply.
I am running 64bit build of squid on 64bit system. The output of top/ps
shows that squid is using as much memory as claimed in report.
I configure cache directory with size of 4T: cache_dir ufs PATH 4194304 128
256.

There are many child-process start, following is output of `ps`:
USER    20401  0.0  0.0  71020  2728 ?        Ss   Feb14   0:00
/PATH/TO/squid -f /PATH/TO/CONFIG/FILE -n squidHot
USER    20405  0.5 11.8 8258832 7771408 ?     S    Feb14 1298:30 (squid-1)
--kid squid-1 -f /PATH/TO/CONFIG/FILE -n squidHot
USER    20440  0.0  0.0  29468  1444 ?        S    Feb14   0:16
(logfile-daemon) /PATH/TO/access.log
USER    20441  0.0  0.0  29460  1256 ?        S    Feb14   0:00 (unlinkd)
USER    20444  0.0  0.0  29468  1252 ?        S    Feb14   0:00
(logfile-daemon) /PATH/TO/store.log

Process 20405 cost maximum memory.

Other part of report also make me puzzled:
	Internal Data Structures:
		  1185 StoreEntries
		  1184 StoreEntries with MemObjects
		     8 Hot Object Cache Items
		     9 on-disk objects
`9 on-disk objects` means only 9 entries of 1185 are stored on disk, and
others are stored in memory?



Amos Jeffries wrote
> Also, your proxy is apparently trying to fit objects with an *average*
> size exceeding 70MB into that 256MB of cache. The bit of the report you
> elided shows how many it is trying to fit in there.

Yes, we have many file larger than 256MB. But what problem will this lead
to? And why?



--
Sent from: http://squid-web-proxy-cache.1019090.n4.nabble.com/Squid-Users-f1019091.html


More information about the squid-users mailing list