Firefox 2’s Memory Management problems
I love Firefox! When Firefox 2 came out I loved its enhancements and wrote a rave about it! But now I'm considering the prospect of downgrading to Firefox 1.5 in my Windows XP installation on my Dell Inspiron 6400 notebook. Firefox2 takes an atrocious amount of memory, for example right now I have just 3 tabs open, and Firefox is taking 74MB of RAM:
I've seen Firefox using upwards of 140MB for less than 6 tabs in the past. Although my notebook has enough memory to spare but this is unacceptable, I really hope that Mozilla fixes these memory leak problems, otherwise reverse migrations to IE could be possible and the growth of Firefox could be stopped in its tracks. Initially when Firefox2 was released, I tested it on a Linux machine and the memory footprint was really small and I was over joyed! But now I'm disappointed! The problem is not uncommon, this guys here faces a 375MB hog, and here is a comparison between Firefox2 and IE memory usage, in which Firefox2 is clearly 'ahead' in consuming memory
Poor memory management plagues many open source projects: OpenOffice, KDE and Eclipse come to my mind. Wasn't it a hallmark feature of open source software to run on older hardware? What ever happened to the hacker ethic of squeezing every ounce of performance from a machine by building efficient software?
November 21st, 2006 - 09:06
First, using lots of memory is not the same as a memory leak. A memory leak means simply that the application should have freed the memory but didn’t. There have been numerous posts around the net on Firefox’s memory usage. For instance, this one:
http://forevergeek.com/open_source/debunking_another_myth_firefoxs_memory_leak_bug.php
Essentially, Firefox caches a lot of stuff in tabs. You can reduce the amount of memory allocated to such caches if you like.
November 21st, 2006 - 09:47
Well Noel I do believe that the problem is indeed due to a memory leak. First of all let me tell you I have tried those two hacks mentioned in the link you provided.
Just do an experiment, open 15 tabs load some page into them, then close so that only 3 are left open. Then check out the memory usage it will be 80MB+ in my case.
Close Firefox2 then, and open just 3 tabs, the memory usage is just 42MB in my case. Why is it taken 40MB+ in the previous case?? Its definitely a memory leak.
November 21st, 2006 - 10:23
Well, I remain unconvinced that the term “leak” is appropriate here. A leak, as I said previously, requires that the application not free memory that it should. The behaviour you describe is exactly what I would expect from Firefox caching the pages. Even though you close the tabs, Firefox does not free the memory associated with the pages you had in those tabs. It keeps up to 5 items of history for each tab. Closing Firefox frees all the memory assigned to the cache.
To demonstrate a leak you would need to show that, after opening 3 tabs, say, memory used is X MB, then after closing and re-opening the same tabs, the memory used is X+n, and that repeating the operation causes n to rise. Then you would have solid evidence of a memory leak that could be submitted to Firefox’s development team.
I am not an expert on Firefox and you may be correct that there is a more serious memory bug here, but the behaviour you describe sounds quite normal to me. I am not running Firefox 2 on my slackware box here so I can’t investigate it here.
November 24th, 2006 - 03:53
No, there’s no memory leak demonstrated here. The 40 MB+ is consumed by fragmentation, memory caches, and other legitimate memory usage. Many people have been trying over the past few months to demonstrate some sort of memory problem in Firefox 2, and if it were this each to demonstrate a memory problem, MozillaZine would be drowning in posts about the problem and bug reports would be rolling into Bugzilla.
November 26th, 2006 - 12:00
Well if no memory leak has been demonstrated here, than its worse than I thought! It means that Firefox2 is indeed expensive in terms of memory. If it were a memory leak, than there was hope that it could be fixed, but now it looks like a ‘built-in’ feature!
November 29th, 2006 - 15:07
I don’t see any reason to believe that Firefox 2 is any more expensive in terms of memory than any other browser. Try any browser, and you’ll see that memory use starts low, and climbs as you visit some sites. Here’s some more reading in case you’re still convinced that Firefox 2 uses more memory than other browsers:
http://www.pcworld.com/article/id,127309-page,6-c,browsers/article.html
http://www.zimbra.com/blog/archives/2006/10/ie_7_a_better_b.html
http://forums.mozillazine.org/viewtopic.php?t=468525
December 1st, 2006 - 19:13
lol get a job. firefox has some serious memory issues. It doesn’t matter whether it’s a ‘leak’ or not.
December 4th, 2006 - 14:31
What would be an example of a “serious memory issue” in Firefox? Don’t keep problems a secret… let everyone so problems can be fixed.
December 4th, 2006 - 20:39
Well after I use firefox 2.0 for a while it starts using 99% CPU and a lot of memory I don’t remember having similar experiences in 1.5 and I’d rather have a Web Browser that isn’t a system hog, than continue using 2.0 and listening to my cpu fan going at full speed till the end of time!
Steve Chapel: I like firefox but this is an issue whatever anybody says about cache or features that doesn’t really matter, what is more important is that my browser doesn’t slow down my machine to a crawl.
-xbytes
December 10th, 2006 - 09:40
Irfan,
Looks like this is a “It’s not a bug, it’s a feature.” situation.
I too believe the term “leak” is not really appropriate over here. There *could* be a leak too. But I’m sure the majority of the lost memory is due to caching which let page loads happen faster when doing a “Back” or reopening recently visited pages.
Ideally ofcourse, some kind of fine tuning should be available…and some already is. But it needs to be made more effective.
As a side note, if IE exhibited the same behaviour, I’d probably have *known* it was a leak caused by bad programming.
. Heh.
But that’s fandom at work.
December 11th, 2006 - 02:22
xbytes: I don’t doubt that you personally are having problems with your installation of Firefox 2. However, the vast majority of Firefox 2 users are not having the kinds of problems you describe. If you go to MozillaZine, you’ll probably be able to find a fix for your problems.
December 13th, 2006 - 01:23
I have a machine where all I use Firefox 2.0 for is viewing a Nagios systems monitoring page that refreshes every minute. It is a completely vanilla Firefox install with no extensions. The pages don’t have any java, flash, etc. — just some javascript for the refresh. It starts out using around 45 MB of RAM. After a day or so it is up to 200 MB of RAM. After 5 days it is using around 1.5 GB of RAM. That sounds like a memory leak to me.
December 14th, 2006 - 03:26
If FF 2 doesn’t have a memory leak- then it does use more memory than 1.5. Since installing FF2, I have noticed a slow down on overall performance- not only with the browser, but using other programs at the same time. Yesterday I kept receiving the “low virtual memory” error in WindowsXP- the only program running at the time was FF. I have since cleared and cleaned everything with a great tool I found, which also helps me keep track of the memory/cpu usage issue, and I’ve received no additional messages. And yes, before doing this I adjusted my page file, did a scan disk and deleted all temp files. Still, with 4 tabs open, FF is using 170MB of RAM, whereas 1.5 never used over 70MB.
January 21st, 2007 - 17:36
Doug: What you describe does sound like a bona fide memory leak. Please file a bug report or at least discuss the problem at MozillaZine.
Beth: If you can tell us how to see Firefox 2 use much more memory than Firefox 1.5, please do so. Then we can file a bug report and get the problem fixed. I’d recommend discussing the problem at MozillaZine.
February 9th, 2007 - 15:49
I gave up with FF2 and went back to 1.5. I prefer the older one’s look and feel anyway. I simply could not live with FF2 hogging all the RAM it could get and even altering about:config didn’t help at all. I even did a complete nuke and reinstall the OS, Win2000 (and no I am not about to “upgrade” to any of Bill the Hick’s new scams,)because I was changing my system drive, and even then FF2 just beasted all the RAM it could get. Just launching it would wipe out over 120MB of RAM and within a few hours I was getting low resources. Dreadful; I mean with 1GB of RAM I should be able to run Photoshop, Dreamweaver, Word and a Web browser without crashes due to memory.
Reinstalled 1.5 and the problem no longer exists. Funny that.
Major, major, major mistake on the Mozilla team’s part. Developers really need to get up to speed with a basic concept– new does not mean better. It’s not good enough for the new version to be shiny and new, it actually has to perform better. Otherwise give it a few years and they’ll all be out of jobs cause no-one wants the new stuff.
February 10th, 2007 - 10:36
I’ve had exactly the same experience with FF2 as Ruaridh and others and have also reverted to 1.5. I have never had 1.5 or any previous version crash. 2 was doing it every couple of hours and also hogging resources as described.
I’m the System Architect for a growing UK insurer (over 100,000 customers) and the 20-strong programming team all dev in FF, then check in IE, Opera etc. This Asus Core Duo laptop is typically running IIS, a MySQL server and various GUIs for it, a couple of VPN connections, YM, a couple of RDCs, a couple of FTP connections and a number of other typical web dev apps simultaneously. The only program it has ever had a consistent issue with is FF2.
All anecdotal I know and I’m not about to go and find the source of the issue – sorry, got enough things to do – but until I stop hearing comments similar to those on this page I’m sticking with 1.5
February 12th, 2007 - 13:25
I think Rich’s point touches on what I was thinking. Don’t get me wrong, I really like Firefox and I would have been delighted if FF2 had been an improvement. I’m certainly never going back to IE.
I do think that if OpenSource is to be a success it has to “just work”, improvements have to “just be better” and users should never have to resort to faffing about with configurations. I know there are huge paid-for software companies out there that have issues like this all the time, but they have the advantage of effectively limitless marketing budgets. OpenSource doesn’t have that, so it has to gain converts because its software “just works.” It’s the killer USP that others wish they had, it’s why FF stole the show in the last couple of years.
That is why this memory problem with FF2 and the responses that say “There’s no problem because we have done xyz tests that say there’s no problem,” are so demoralising– they play right into the hands of those who say OpenSource isn’t serious. There IS a problem with FF2, it doesn’t matter a fiddlers if it’s a “memory leak”, just a consequence of the way FF2 apportions memory or whatever. If I see a system crashing under FF2 because of low memory and working fine under FF1.5, I know where the problem lies. If Mozilla engineers can’t find it they’re using the wrong tests.
February 27th, 2007 - 14:31
As far as I know Firefox2 behaves quite well on my PC. A have AMD dual core with 2GB RAM. I put it together myself so it’s far from perfect.
I’m a tab addict, most of the time I have more than 20 tabs open while @ the same time encoding a movie to divx and I don’t encounter that memory leak or that 99% CPU issue some of you guys are seeing. It must be your machines and not Firefox. I hardly close the Firefox browser either it’s usually open for up to 16 – 20 hours with no problem.
March 28th, 2007 - 19:18
”The responses that say “There’s no problem because we have done xyz tests that say there’s no problem,” are so demoralising.”
There’s one slight problem with that statement. Absolutely no one has said there’s no memory problem. What we have said is that people who are seeing serious problems are not talking about their problems is enough detail that anything can be done about them. There are some memory leaks, but most people don’t ever notice because the leaks are slow and subtle, taking many days to build up to any noticeable level. A small minority of people do have serious memory issues, but they cannot describe in enough detail about what precisely their problem is so that a bug report can be written so the problem can be fixed. As I have said many times before, if you’re seeing a problem, please discuss it in as much detail as you can at MozillaZine so that it can be fixed, whether the problem is with Firefox, an extension you’re using, or a problem with your configuration.
May 17th, 2007 - 20:39
Another piece of anecdotal evidence: websites that use a lot of javascript tend to cause FF’s memory usage to balloon to hundreds of MB.
June 8th, 2007 - 11:42
I have a PC with 256mb RAM and running Windows 2000 if I go to the following web site…
http://ipswichtown.rivals.net/default.asp?sid=911
then open an few tabs in FireFox 2.0.0.4, containing pages linked from Latest Headlines and also some pages containing posts from the Message Board, my browser and machine slows to a crawl pretty quickly. This never happens with Internet Explorer.
Although the Firefox interface is very good, the memory management appears to be poor by comparison with IE.