Re: some linux tuning

From: Stephen R. van den Berg <[email protected]>
Date: Sat, 26 Jun 1999 20:55:38 +0200

jlewis@lewis.org wrote:
>On Sat, 26 Jun 1999, Stephen R. van den Berg wrote:
>Memory usage for squid via mallinfo():
> Ordinary blocks: 217882 KB 353099 blks
> Total in use: 219274 KB 97%
> Total free: 8746 KB 4%
>Memory accounted for:
> Total accounted: 96695 KB

Ok, that means that it's a regular malloc() leak of small allocations.
I.e. it's outside the memory pools of Squid.

Strange. I haven't noticed this leak so far.

Running a 18 GB 100% filled store squid for 3 x 24 hours gives:

Connection information for squid:
        Number of HTTP requests received: 1540405
        HTTP requests per minute: 363.1
        ICP messages per minute: 0.0
Memory usage for squid via mallinfo():
        Total space in arena: 47357 KB
        Ordinary blocks: 18014 KB 13129 blks
        Small blocks: 0 KB 0 blks
        Holding blocks: 71608 KB 254 blks
        Free Small blocks: 0 KB
        Free Ordinary blocks: 29343 KB
        Total in use: 89622 KB 189%
        Total free: 29343 KB 62%
Memory accounted for:
        Total accounted: 71141 KB

Which seems ok to me, albeit a bit fragmented, apparently.
The 18MB difference between accounted and real usage is mostly
due to the HPL_REPL heap allocations (but it's stable, not growing).

>Last weekend, 2 patches came out that were supposed to fix 2 leaks. I

Where did this happen? I am on the squid-dev list, I think, but didn't
notice any patches of that kind.

> Total in use: 126207 KB 99%
> Total accounted: 90467 KB

Hmmm, already 36MB unaccounted, and growing I presume. Not good.

>I was actually considering applying your patches that you posted about a
>few days ago to see if that made a difference.

I'd definitely give it a try. It has been running like a charm so far;
though I have to admit that the max uptime of my current squids was
something like 5 days because I had to restart the program to test
a new version every time. I don't really recall fixing any memory
leaks though, so the leak might simply be caused by config or usage
differences.

Actually, I'm about to generate another set of my patch today. Overal memory
usage reduced (relative to my last set) by another 25% for allocated memory,
or 12% for total memory (including memory mapped regions).
This time the patch will be complete (including the heap.[ch] files).

-- 
Sincerely,                                                          srb@cuci.nl
           Stephen R. van den Berg (AKA BuGless).
"Father's Day: Nine months before Mother's Day."
Received on Sat Jun 26 1999 - 12:33:08 MDT

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