[PLUG] Re: Firefox Heap Memory Constipation

Keith Lofstrom keithl at kl-ic.com
Tue Jun 26 18:27:13 UTC 2007


> Keith Lofstrom (keithl at kl-ic.com) typed this ...
> I typically leave a firefox window ( or three or four or ten ) open
> all the time.  This could be the source of my crashes, as it eats
> up all my memory.  Any suggestions of other things to look at in
> order to debug this?

On Mon, Jun 25, 2007 at 10:56:23AM -0700, Keith Lofstrom wrote:
> The pointer got me looking in the right direction, thanks.  It turns
> out that "this is not a bug, it's a FEATURE" in the minds of firefox
> developers.  There is a firefox memory area called a heap, which
> firefox uses for all sorts of things.  When firefox needs more 
> memory - for example, to render a large image - it increases the heap.
...

And here is a blog post from last year about Firefox memory management:

http://kevintwodotoh.com/2005/12/30/bugs/firefox-is-still-forgetful.html

Scroll down to the long comment by Robert Bradbury, below.  The problem
according to Bradbury is bad design of memory allocation, combined with
Linux swap behavior targeted for servers, not workstations.  Most pages
just stay stuck in the heap until the browser uses up memory and starts
eating swap space, at which point the primitive garbage collection 
algorithm starts going bonkers, continuously scanning swap space for
something to remove.  

Bradbury ( from Seattle ) suggests that instead of adding bells and
whistles to firefox (spell checkers, fer crying out loud), they rewrite
the memory model around mmap() instead of malloc() and take more
responsibility for managing the memory model.  Until that happy day,
Bradbury suggests tuning the kernel with  "sysctl -w vm.swappiness=10"
and quitting firefox before the system starts using significant swap. 
BTW, once firefox gets into heavy swapping, quitting can take minutes.

Maybe it is time for a fork, named like Ex-Lax to fix Firefox
constipation.  Ex-Fox or Fox-Lax?   I will put a bit more about this
up on my page at http://www.keithl.com/fixfirefox.html .

Keith

-- 
Keith Lofstrom          keithl at keithl.com         Voice (503)-520-1993
KLIC --- Keith Lofstrom Integrated Circuits --- "Your Ideas in Silicon"
Design Contracting in Bipolar and CMOS - Analog, Digital, and Scan ICs



More information about the PLUG mailing list