Firefox memory leaks

Soldato
Joined
18 Oct 2002
Posts
3,245
Location
melbourne
Why is Firefox 3.0.4 using 160MB RAM even after I´ve closed all tabs? It uses about 27MB on fresh start so what is it doing with the remainder 130MB? Is this normal?

110m148.gif
 
It'll drop eventually (or be unused but left in the middle of an allocation until the whole lot gets swapped out), but it isn't a leak - for one, if you opened the tabs again you should find the memory usage doesn't increase as much.

What was in the tabs? Plugins are notoriously bad for messing with memory usage.
 
I'm not impressed with this new version of firefox. When I stream radio using the browser it has memory leaks as above.

When using IE, it's 100% fine.
 
Stream radio using what? Flash?
You're using a totally different version of Flash with one and the other (and Adobe generally puts more effort into the IE version than the NSPlugin one), and using more memory isn't the same thing as "has memory leaks"...
 
I've been getting a lot of issues with flash in the latest version. Not sure if it is Firefox or Flash really.
 
It'll drop eventually (or be unused but left in the middle of an allocation until the whole lot gets swapped out), but it isn't a leak - for one, if you opened the tabs again you should find the memory usage doesn't increase as much.

What was in the tabs? Plugins are notoriously bad for messing with memory usage.

Hi Tolien. The mem usage doesn´t drop. I took that screen grab after returning to my PC after a few hours (and the system wasn´t on standby).

I often use Adobe PS, Illus, Flash and DW all together, which take up a huge amount of RAM, but Firefox still sits there hogging a 160MB for nothing.

I haven´t experienced this problem in Safari or Chrome. I don´t use IE enough to compare.

I usually restart FF every hour to clear up memory. I love FF but the hogging of RAM really annoys me.
 
So you closed them all then left it for hours? If you got to about:cache, and look at "Storage in use" for the memory cache, how much is it? Is it the same if you try safe mode or disable plugins/addons? How much RAM's in the machine?
30MB sounds abnormally low to start with, and the RAM will be being used for something (probably cache, and it probably will expire eventually).

If 160MB makes that much difference, maybe it's time to buy more RAM (or kill Firefox if you really need to four memory-hungry apps at once). If you're that short, the OS would swap Firefox's allocation out anyway (which would kill any issue with fragmentation).
 
Stream radio using what? Flash?
You're using a totally different version of Flash with one and the other (and Adobe generally puts more effort into the IE version than the NSPlugin one), and using more memory isn't the same thing as "has memory leaks"...

By memory leak I mean that the process memory usage just keeps incrementing infinitely until the browser crashes.

Unsure of how it's streaming, but the actual files are .mp3's I believe - http://kube.totalkiss.com/?jumpto=kiss100 (Previous shows)
 
It's Flash - right click the player. What version of Flash are you using?

It's stable at ~58MB here, with Fx 3.0.4 and Flash 10r12, with just that link in a tab playing whatever the top link was.
 
Hi Tolien,

Thanks for helping me with this.

I started FF in Safe Mode. The homepage is about:blank

On fresh start, and leaving it for 10 mins, task manager reports 18.8MB mem usage.
Memory cache device

Number of entries: 30
Maximum storage size: 24576 KiB
Storage in use: 342 KiB
Inactive storage: 0 KiB

After an hour of surfing, and then closing all tabs and leaving the browser for 30 mins, the mem usage settles at around 160MB

Number of entries: 620
Maximum storage size: 24576 KiB
Storage in use: 134240 KiB
Inactive storage: 0 KiB

All of the entries are for .JPEG, .GIF, .PNG and .ICO, from websites I have visited in the past hour. The entries have expiry dates from 1970 all the way up to 2038. Many have no expiry dates. Are these dates defined in the websites´cookies?

My understanding is that when/if I revisit these websites, FF loads the images from cache. I visit Digg a lot, so the majority of entries are for sites that I will never visit again, so I would have expected FF to drop these entries from the cache as soon as I close the tab.

Is this normal behaviour? Any suggestions?

Many thanks :)
 
Last edited:
160-18.8 = 141.2MB, and it says it's using 134MB in the memory cache. "Problem" solved.

The cache expiry is defined by the server - dates in the past basically mean they'll expire instantly. The dates are explained here.
It doesn't sound like abnormal behaviour - it should drop if you leave it for longer than half an hour and you can tweak how much it uses with browser.cache.memory.capacity.

Something changed with image caching in Fx3, but I can't remember what.
 
While you may have no tabs open, pressing "Ctrl-Shift-T" will re-open them in the order they were closed, getting the content from the memory cache firefox keeps.
 
Back
Top Bottom