Re: [squid-users] Squid getting too big?

From: Florin Andrei <florin@dont-contact.us>
Date: 06 Aug 2001 12:47:53 -0700

On 06 Aug 2001 15:28:06 -0400, Mike Diggins wrote:
>
> Wow, 1.8 GB is big!

Oh, yeah! :-) But i have 2 GB RAM, and tons of swap.

> Do you have Cache Manager running?

Sure. I collect information all the time with MRTG.

> When Squid gets
> this big, check the Memory Utilisation menu item. Under Allocated (KB) at
> the bottom (totals), is the value close to what TOP shows?

No, it isn't. top shows a much bigger value.

> I wonder, if there is a memory leak, would these two values become further
> and further apart? In other words, does Squid know it has gotten that big
> or not?

Squid never shows a size bigger than 1 GB. In my MRTG graphs (collected
through cachemgr.cgi), the process size always flatten at exactly 1 GB.
But with top or ps i can see the process growing further.

> I'm pretty new to this so I don't know what to expect from Squid as far as
> memory utilisation goes.

From what i saw on Linux, it should grow up to cache_mem + ~10 MB for
each GB of disk space.
That is, if cache_mem is 32 MB, and you have 20 GB of disk cache, you
should end up with something like 220...250 MB process size.

> Mine hasn't grown out of control yet so perhaps
> I'm jumping the gun. I got nervous when I saw it suddenly jump from 220 M
> to 500M in one day! Before that it took about 2 weeks to climb to 220 M.

So, 220 MB is the right size. But then it will hit a bug and the size
will go nuts.
I've heard other people saying that on Solaris it's doing fine for a
while, and all of a sudden it grows like crazy.
On Irix, it just keeps on growing until it dies (true for both squid-2.4
and squid-2.3; it looks like 2.3 is even worse - it grows faster, eats
up more CPU, the traffic is slower and it dies sooner).

> I made some other changes to my config today including upgrading to the
> latest tar ball and running the dlmalloc option. We'll see what that
> does.

For me, it didn't made any difference, with or without dlmalloc.

P.S.: Just for the record... While i was writing this message, i got
paged by RunCache because Squid just died:

FATAL: xmalloc: Unable to allocate 61440 bytes!

-- 
Florin Andrei
Received on Mon Aug 06 2001 - 13:48:04 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:01:29 MST