Re: [squid-users] Squid Memory always increasing

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Sun, 27 Feb 2011 17:39:52 +1300

On 26/02/11 16:06, Saurabh Agarwal wrote:
> Thanks Amos! One more question.
>
> When there is no load on Squid after a period of heavy load will Squid memory footprint won't go down? I think it should. Are there some ways other than "memory_pools off" config to make Squid free the earlier malloc'ed memory.
>

Squid should always be "freeing" memory as soon as it is finished with.
Allocating and freeing is not to be confused with the memory footprint,
which always can only grow.

Squid allocates from the OS as much as needed. More when more is needed.

When pools are on Squid will retain internal pools to locate the
currently available/"free" memory tuned to exact object sizes Squid uses
for re-use by the objects in later needs. With pools turned off in Squid
this is returned for the OS to maintain such pools via its less well
tuned algorithms.
The OS will still report a memory footprint equal to the largest *ever*
allocated amount used by Squid. Which should grow to a max and hold there.

The wiki page on memory usage explains what Squid uses RAM for. To give
you a good idea whether the amount is reasonable for your Squids maximum
traffic load. And to allow you to roughly budget the system RAM.

Amos

-- 
Please be using
   Current Stable Squid 2.7.STABLE9 or 3.1.11
   Beta testers wanted for 3.2.0.5
Received on Sun Feb 27 2011 - 04:40:03 MST

This archive was generated by hypermail 2.2.0 : Mon Feb 28 2011 - 12:00:04 MST