Squid memory leaks in -stable using libc malloc

Poul-Henning Kamp phk at phk.freebsd.dk
Mon Sep 8 09:59:14 PDT 2003


In message <20030908064248.GA7522 at HAL9000.homeunix.com>, David Schultz writes:
>
>Note also that there's a difference between heap size and physical
>memory usage.

I have not had much to add to this topic, but this one is so important
that I want to chime in.

You cannot infer _anything_ about the application from the heapsize
in a VM based system.

It is a totally irrelevant number, it has about the same information
contents as "the most recent block number allocated in a filesystem".

>A better
>metric for the memory pressure that an application is exerting on
>the system is its resident set size---'RES' in top(1).

Which I should add, tells nothing much unless the VM system is under
pressure.

>phkmalloc
>by default is not aggressive about returning memory to the system,
>but it usually exhibits very good behavior from the point of view
>of the VM system.

I can highly recommend the paper about phkmalloc in
src/share/doc/papers/malloc

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.


More information about the freebsd-ports mailing list