Search squid archive

Re: memory_pools_limit question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2024-12-02 03:56, Masanari Iida wrote:
Hi,
I would like to understand memory_pools and memory_pools_limits setting.

In case memory_pools_limit is set to none (as default),
all squid process memory that can be seen by ps(1) is being used by squid?

Yes, for some definition of "being used". Some of the memory reported by ps is idle memory_pools memory that is not used by current Squid transactions (but it is still "used" by Squid in general sense).


In case memory_pools_limit is set to 100MB and 1GB of memory is being
used by squid,  then actual memory usage is 900MB and 100MB is reserved
as unused.

If you are asserting that "100MB is reserved as unused", then I disagree with that assertion. Squid does not pre-allocate memory just because you enable memory pools. Special tricks (that I do not recommend using, and you are not discussing above) aside, Squid memory pools may only preserve previously _used_ memory (to avoid re-allocation). memory_pools_limit limits how much previously used memory Squid can keep for that purpose.


In this case, process memory usage seen by ps(1) is 1GB.

Background of the question.
I would like to know whether memory_pool_limit size is
included in the process memory usage, seen from os commands such as
ps(1), top(1).

The short answer is "yes": OS commands do not know anything about Squid internals and, hence, include everything Squid is using, but there are different kinds of "use".


N.B. Some Squid memory allocations do not go through memory pools.


HTH,

Alex.

_______________________________________________
squid-users mailing list
squid-users@xxxxxxxxxxxxxxxxxxxxx
https://lists.squid-cache.org/listinfo/squid-users



[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux