Re: Squid-2.4 memory leaks

From: Andres Kroonmaa <andre@dont-contact.us>
Date: Wed, 10 Oct 2001 00:54:33 +0200

 Andrei,

On 9 Oct 2001, at 14:56, Florin Andrei <florin@sgi.com> wrote:

> On Thu, 2001-10-04 at 11:58, Henrik Nordstrom wrote:
> > Florin Andrei wrote:
> >
> > > Hmmm... I still see aweful memory leaks with 2.4STABLE on Irix, on a
> > > machine that gets like 90 req/second. The process starts at approx 200
> > > MB, then it grows like hell, until it crashes 1...3 days later, when
> > > it's almost 2 GB in size. :-/ Tried dlmalloc, it doesn't help.
> >
> > Any clue on where this memory goes? I.e. any sign in the cachemgr pages?
>
> I attached some cachemgr pages. The ones ending in 1 are taken
> immediately after a crash (the process size was still very small); the
> ones ending in 2 were taken approx 24 hours later, when squid said it
> had 700 MB process size, but "top" said squid was actually 1030 MB :-)
> (i think i'll believe top :-P).

 Set:

memory_pools_limit 8 MB
cache_mem 16 MB

 in your squid.conf and restart. Try this and report your results.

 You seem to have very heavy free memory fragmentation:

Memory usage for squid via mallinfo():
        Total space in arena: 1014295 KB
        Ordinary blocks: 157434 KB 60105 blks
        Small blocks: 173903 KB 4592300 blks
        Holding blocks: 1435 KB 45923 blks
        Free Small blocks: 253 KB
        Free Ordinary blocks: 681270 KB
        Total in use: 332772 KB 33%
        Total free: 681523 KB 67%
Memory accounted for:
        Total accounted: 263119 KB

 You have 681MB sitting in free. Its because spikes of load caused
 some data be allocated from high ram, and after freeing, some
 pieces left in highest ram keep malloc from being able to return
 all ram inbetween to the system. Some 8-byte data might keep all
 680MB tied. The only workaround is to free ram as soon as squid
 releases it, so you need to reduce idle mempools and cache_mem.

 This isn't a leak. Memory accounted for and total in use comply
 to what is typically normal for squid. This issue is tried to be
 addressed in chunked_mempools, but it wouldn't appear until 2.6.

------------------------------------
 Andres Kroonmaa <andre@online.ee>
 CTO, Microlink Online
 Tel: 6501 731, Fax: 6501 725
 Pärnu mnt. 158, Tallinn,
 11317 Estonia
Received on Tue Oct 09 2001 - 17:01:26 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:14:30 MST