squid-2.2.STABLE2 & memory leaks

From: <jlewis@dont-contact.us>
Date: Sun, 16 May 1999 13:06:50 -0400 (EDT)

I searched the list archives and found this message that doesn't really
make much sense to me. It's a pretty old one anyway, so I don't know if
the advice still applies.

---
"Jeff Madison" writes:
>
>I am running the new squid beta 22 on Solaris x86 2.6.  We seem to be
>experiencing some type of a memory leak.  I've read something about
>compiling with a different malloc library that may solve the problem. Does
>any one have information regarding which library is the best, where can I
>get it, and how do I use it?
http://squid.nlanr.net/Squid/FAQ/FAQ-8.html#ss8.10
dlmalloc
dlmalloc has been written by Doug Lea. According to Doug: 
     This is not the fastest, most space-conserving, most portable, or
     most tunable malloc ever written. However it is among the fastest
     while also being among the most space-conserving, portable and
     tunable.
dlmalloc is included with the Squid-1.2 source distribution. To use
this library, you simply give an option to the configure script:
        % ./configure --enable-dlmalloc ...
Duane W.
---
Well...I'm running squid-2.2.STABLE2 on Linux (redhat 5.2 upgraded to 
kernel 2.2.7, mainly for increased fds/process).  Squid seems to just
grow and grow.  I've got cache_dir set for 8.5GB, and cache_mem 16 MB.
Almost immediately, squid is using 80MB of memory.  This is fine, as the
box has 256MB.  The process grows though, and after a few days of heavy
use, the process is 200+MB.  If I run squid talking to ICP peers, but with
reduced transparently proxied traffic, process growth is signifigantly
slower.  
Here's the info that makes me think it's a leak.  This is from cachemgr,
general runtime info:
Memory usage for squid via mallinfo():
        Total space in arena:  213280 KB
        Ordinary blocks:       203732 KB 405507 blks
        Small blocks:               0 KB      0 blks
        Holding blocks:          2388 KB      4 blks
        Free Small blocks:          0 KB
        Free Ordinary blocks:    9547 KB
        Total in use:          206120 KB 97%
        Total free:              9547 KB 4%
Memory accounted for:
        Total accounted:        89936 KB
It knows that it's using more than 213MB, but it says 89MB accounted for.
What's up with that?  I was under the impression that Linux's malloc was
pretty good.  Should I try dlmalloc?
----don't waste your cpu, crack rc5...www.distributed.net team enzo---
 Jon Lewis *jlewis@lewis.org*|  Spammers will be winnuked or 
 System Administrator        |  nestea'd...whatever it takes
 Atlantic Net                |  to get the job done.
_________http://www.lewis.org/~jlewis/pgp for PGP public key__________
Received on Sun May 16 1999 - 11:52:45 MDT

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