« Scammers hack gmail and try for a $1200 scam via Western Union | SquareSpace editor: a few bugs and no error recovery make me very sad »
Wednesday
13Jan2010

Memory bloat makes me hate Firefox (regretfully)

This problem with memory bloat in Firefox (memory leaks) is well-known and Mozilla has been working on it for quite a while. I’ve been expecting some relief, but I’m about to give up on it and wait for real news of some improvement. I have pared down the plugins I use to a few essentials, so I doubt this can be blamed on extensions.

It is the only program I use that can render my machine so useless. It also seems fairly unpredictable, but perhaps it’s related to a combination of things I never think about in my frustration.

Here is an unwinding of a scenario where I was tempted to hit the power button. Instead, I patiently finished up, and documented the footprint the Firefox carcass left, and compared it to a fresh carcass.

Firefox locks out the GUI and the window management, because it is desperately writing memory to and from the disk… memory which has become hideously garbled, with tiny important pieces mixed in with useless stale stuff. Just look at the page fauts and VM size.

 

As you see in Fig. 2, the processor was very busy “cleaning up” the massively bloated program, so these can’t be “regular” memory leaks. Instead, they are “effectively” memory leaks — and don’t get cleaned up when you delete the tabs.  I’d be happy to help Mozilla find the culprit, but I’m unaware of an easy way to report this … since it’s not “technically” a bug. It could be as simple as me killing all the tabs, seeing the memory bloat still exists, and hitting a button “shut down Firefox and report memory bloat back to Mozilla”

 

I suppose one option is to forgo “virtual memory” (set page file size to a very low number) but that would affect every application and also prevent me from purposely overloading my machine — that is to say, purposely using more memory than I really have.

Chrome uses separate processes for each tab, which gives each tab a firewall against the others. One tab could have a massive leak, but could be killed independently and leave the others usable.

The 2nd and 3rd performance graphs just show that the system is indeed idle, especially after killing the zoom utility which I use to make the text more legible in the screen shots.