Firefox Memory Usage

First, while I do create some software, I am not what should be called a developer. I don’t have the experience.

With that out of the way, it seems to me that Firefox (1.0.3) is using up a decent amount of memory on my (Windows XP) system. When it first starts, it uses perhaps 18MB. Within just a few minutes, it’s at 20MB – not a huge jump, but a jump nonetheless.

Earlier today I noticed that things were running slowly and I fired up the Windows Task Manager. Firefox was using over 120MB. Now I had not logged off or even restarted Firefox in probably a week. I just leave it running. I also had probably 15 tabs open.

As I started closing the tabs, the memory usage really didn’t change. There may have been some adjustement, but nothing significant. This would normally lead me to believe that tabs don’t matter much, if at all. When I finally closed Firefox, that memory was released. Starting up again, it’s now back around the 20MB figure.

It’s certainly possible that something on my system is ill- or mis-configured and causing the problem, but I’m not sure where I’d even look, as the memory appears to be allocated to Firefox alone. It could, perhaps, be the Bloglines Toolkit (or some other extension), but short of uninstalling it I’m not sure how to test that (I will uninstall it to see if it helps). And more specifically, if it is the issue, I’m not sure how to address it.

So I’m wondering if any of you have seen similar behavior, either with or without the Toolkit or other extensions?

Update: In a quick test, I disabled the Toolkit notification, then disabled the extension entirely, so it should not be running. Firefox appears to periodically add 8K or so to the running memory, even without the Toolkit. I’m not sure what this is, only that it does appear to happen from time to time. It doesn’t appear to be the Toolkit, though, and for that I’m grateful.

Then I started testing. A fresh load of Firefox, using the local paper, started at about 21MB. This size varies a bit depending on the size of the page you load, but seems to be relatively consistent if I load the same page over and over again for testing.

In any case, those values seemed consistent. So I started adding tabs. I chose this article, just because I happened to find it interesting. Using the Firefox “Page Info” option, it shows the page as 11K. When opening this page as an additional tab (leaving the front page in the other tab), the memory usage jumps up by about 3MB. Opening another tab with the same size results in sizes of 1.4MB to just over 2.0MB for each tab opened.

Those are reasonable numbers – I have no problem with the size in general, as I typically only have a few tabs open, so the footprint is still small – about 31MB in this example, after having the front page and five copies of the article open at the same time (6 tabs total).

The problem seems to come on closing those tabs. I closed all five of the articles, and the memory savings was just over 1MB. So while opening those five tabs added about 10MB to the memory used by the application, after closing those five tabs, just 1MB was released, leaving a net gain of 9MB for no effective difference after closing those tabs!

Update: For comparison purposes, I tried the same test in IE (using windows instead of tabs, of course). The first window was smaller than Firefox – about 19MB compared to 21MB. Small savings, but interesting to note.

The next window added nearly 13MB of memory – all the way up to 32MB, which immediately places it higher than Firefox with all 6 tabs open. Each of the final four tabs required 1-2MB, for a final footprint of just over 38MB. So it ends 8MB higher than Firefox. If you open a ton of tabs/windows, then this could be a reasonably significant number.

Then I started closing windows. By the time I was back down to a single window, I was running with 23MB – just over the initial size. So while IE added 19MB of memory to the running instance, it also released all but 4MB of that after the windows were closed, and perhaps more importantly, the total size after closing those extras was just 23MB – compared to Firefox at 30MB.

Opening the extra windows again resulted in a higher memory footprint at the end, but it still seems that IE is releasing most of the extra memory used, while Firefox is keeping it. More as I play with it some more.

Update: After observing this behavior for a couple of days, I can say with certainty that Firefox does not immediately release the memory in use by those extra tabs, while IE does (for windows). However, it does seem that Firefox will release at least some memory periodically, as I have seen an instance of Firefox go from 100MB to 80MB with absolutely no change in the number of tabs (or even the URLs open in those tabs). So I’m not sure how, but it does seem to free up memory from time to time. Just not immediately.

32 Replies to “Firefox Memory Usage”

  1. I dunno about anyone else, but my computer has FF 2.0.0.6 goes from 20mb start, easily up to 124,000 K in just minutes, with no additional tabs opened.

  2. Sure it is a memory hog but there are just so many damn useful extensions for it… Gmail encryption, tabmix, web developer, adblock, noscript… After I did some of the about:config configurations I generally keep firefox inside the 60MB-150MB section, but this is not bad considering i have 1700MB of ram.

    The reason why I will not go with Opera is because the interface is so damn ugly, and I am obsessed with my bookmark toolbar on firefox. The way it displays my rss feeds are fantastic, and I love my favicons in the bookmark toolbar.

    IE is just a mess period, and the live toolbar and Maxthon seem to have sluggish performance with their tabs. Even though I do like some of the live toolbar features one in particular is like a research type extension…

    It would be fantastic if Firefox could do better, but in the mean time it will do…

    I just noticed however with the configurations to my Firefox, when I minimize Firefox it goes from 30mb to 2mb… WOW. This is with 68mb VMsize.

Leave a Reply

Your email address will not be published. Required fields are marked *