Firefox 3 is Still a Memory Hog

One of the biggest “improvements” that Mozilla claims has made its way into Firefox 3 is improved memory usage, in particular, the vanquishing of memory leaks:

Memory usage: Several new technologies work together to reduce the amount of memory used by Firefox 3 over a web browsing session. Memory cycles are broken and collected by an automated cycle collector, a new memory allocator reduces fragmentation, hundreds of leaks have been fixed, and caching strategies have been tuned.

We’re sorry to have to break it to you, but if you thought it was too good to be true you were right. Firefox still uses a lot of memory – way too much memory for a web browser.

We haven’t seen it reach 1GiB+ like we have with previous versions, but it’s quite normal for Firefox 3 to be sucking up ~300MiB of memory right off the bat, without a memory leak (the difference between memory leaks and normal memory abusage is that in a memory leak you’ll see the memory usage keep increasing the longer the browser is open/in-use).

Firefox Memory Hog

Firefox Wasting 800 MiB of memory

This is a screenshot of Firefox’s memory usage after just a half hour or so with only a couple of HTML-only tabs open. This particular screenshot was taken on Linux where Firefox is using the shared GTK libraries – on our Windows PCs, it’s normal to find Firefox 3 taking up ~350MiB or so on both XP and Vista.

The sad thing is that isn’t caused by one of the memory leaks that plagued previous versions of Firefox. It’s Firefox 3 is supposed to take up that much memory – at least, that’s our assumption given how we’ve never seen it take up less.

Firefox 3 has a number of memory-hogging features added to the mix that are probably at least partially responsible for the absolutely gargantuan memory footprint. For example, Firefox now uses an SQL engine to keep track of your history and bookmarks, amongst other things. While that particular feature is powered by SQL-lite, which should – in theory – not take up too much memory, we’re at a loss to explain what else is wasting memory left, right, and center in the world’s most-popular open source web browser.

Things like full-text on-the-fly searching of the web cache for when you type text in the address bar certainly have an impact as well – that’s a lot of stuff to keep in memory at one time. But Opera 9.5 does the same with a lot less memory, so obviously Firefox 3 is doing something wrong.

It’s a shame that Firefox 3 is on the verge of a release and is so terribly unfit to run on any machine – Windows, Linux, or OS X – with less than at least a couple of gigabytes of memory.

  • Similar Posts

    Craving more? Here are some posts a vector similarity search turns up as being relevant or similar from our catalog you might also enjoy.
    1. On the matter of Firefox and memory leaks...
    2. Firefox 2.0 Recap
    3. Firefox Download Conspiracy
    4. Firefox Cut & Paste: 1 Bug, 4 Years, No Solution!
    5. Firefox 1.5 Beta 1
  • 506 thoughts on “Firefox 3 is Still a Memory Hog

    1. I read Squall’s recent post about the browser.sessionhistory.max_total_viewers setting
      and decided to do a little experiment. I’m running version 3.1 beta 3 so my results
      (and mileage) may vary from yours. On my XP Media Center HP dv5000 with 2G RAM, I have been seeing as much as 1.2G of memory being consumed by FF.

      My experiment was to alternate the browser.sessionhistory.max_total_viewers between -1
      (which was my default for some reason) and 1 as suggested by Squall. I ran two FF windows with a total 31 tabs open between the two windows. Only three add-on were
      enabled: CoolPreviews 2.7.2, Google Toolbar for Firefox 3.1.20081127W, and RealPlayer
      Browser Record Plugin 1.0. I have another of other add-ons but these are the only
      ones compatible with the beta browser.

      I toggled the setting for browser.sessionhistory.max_total_viewers and after each
      toggle ended FF by termininating the process through Windows Task Manager. I allowed
      all tabs to open and stabilze performed a few routine tasks in each tab. Some of the
      tabs had ActiveX and/or java controls active. The same tabs were loaded each time so
      with the exception of changed page content (which may or may not have been trivial)
      the environment was the same.

      I then let the windows stay open for at least five minutes and recorded the Mem Usage
      as shown in Task Manager. Here are the results (mem values in M):

      browser.sessionhistory.max_total_viewers value Initial 1 -1
      809 402 428
      398 421
      437 406
      401 419
      390 442

      Average 405 423

      I then changed browser.sessionhistory.max_total_viewers to 1 and let the browser run
      undisturbed for over an hour. Peak Mem Usage was 516M. Changed the setting back to a
      -1, let it set for an hour and the reading was 622M. Switched back to a 1 and left it
      for nearly 4 hours with what would be my normal usage. That reading waS 517M.

      Conclusion: The browser.sessionhistory.max_total_viewers setting of 1 seemed to have a pronounced though small effect in the memory required by FF. Anecdotally, it seemed that the browser loaded faster and was more stable but because I’m running a beta version I can’t categorically state that it’s solely the result of the setting.

      I will watch and see if, in normal usage, I have the same long term “creep” in memory as I have observed in the past and will post after a couple of days.

    2. mkn,

      Firefox is built nearly entirely with scripting. as such, it is subject to be influenced negatively in many circumstances where the cycle collector fails.

      At two points in time i was seeing usage of over 1GB, The first was caused by opening multiple flash applets (namely poorly made flash) and the second was at caused by the installation of KIS2009, in which renaming mzvkbd3.dll and mzvkbd.dll and reloading Firefox fixed completely.

      It could be of benefit to start in safe mode(w/networking) and see if the same usage is seen.

      If not, you should then go back to normal mode, and use Process Explorer to find out exactly what files are being loaded by the Fx process, thats initially how i found the mzvkbd3 file to be the cause of my issues.

    3. Another source of Firefox slowdowns is sqlite fragmentation, especially where the places file is over 50MB >.<

    4. mkn, read that link i posted, bfcache is set to automatic, based on the installed memory.

    5. I think this guy is an Internet Explorer Fanboy and is trying to find a way to say Internet Explorer is better than Firefox. Because I also don’t see how this guy got the memory usage on Firefox unless he used Firefox 2.0 instead or loaded up on add-ons that are known to cause high amounts of memory consumption.

      I did a little test of my own using Firefox 1.0, 1.5, 2.0, 3.0, 3.5 and Internet Explorer 7, Internet Explorer 8.

      What I found was Internet Explorer 8 did worse on the acid3 test then Firefox 1.0.

      What does this mean? It means Internet Explorer 8 (released March 19th 2009) has older technology then even Firefox 1.0 (release Nov 9th 2004) when it comes to web standards. I think that says it all. Internet Explorer 8’s technology is at least 4 1/2 years behind Firefox.

    6. Well, that’s of absolutely no help whatsoever. There are people here who are fans of Firefox and would just like to get it fixed. It hogs masses of memory and fails to give it back to the system. It’s nothing to do with Internet Explorer, 3rd party add-ins, external scripts or any other crap like that. FF without add-ins or any modification hogs memory once you start using multiple tabs and sites that are “content-rich” (mafia wars on myspace as an example). It really is that simple.

      People that have the problem are still using FF, despite the memory leak, and can do without the waters being muddied by those who get their rocks off worrying about which browser is the bestest one in the whole wide world. Cuz those rose-tinted glasses are spoiling the view.

    7. MattLee, that’s exactly the sort of extremely unhelpful “Firefox is God” sort of behavior that helps no one – least of all, Firefox and its users.

    8. Ah Ok then so. And Myspace somehow manages to keep control of FF after navigating away, using it’s grip on the browser to make FF retain all that lovely RAM and not give it back to the system. That’s nearly as clever as a really clever thing, isn’t it?
      Well done you for spotting it!!

    9. Simple rule of thumb that I go by for eliminating nonsense comments:

      If anyone offers a negative point of view about a product and they’re subsequently accused of being a fanboy for the other side, or a troll – it’s usually an indication that the accuser is a fanboy or troll. From that point on you can skip over any other comments by the same author. It really helps clear the clutter. (You know who you are!)

      The facts based on tons and tons of complaints:

      Firefox is unacceptably hoggish on many, perhaps most systems. It’s often sluggish to start, and occasionally refuses to shut down, leaving the processes running. This appears to be true if even if you have no addons, and is likely made worse by poorly written addons. This problem is also exacerbated by certain hardware and/or software configurations that may be on your system.

      Firefox developers cannot possibly be ignorant about these issues. They have apparently decided that this is a suitable compromise based on ratio of satisfied to dissatisfied users, and they must assume that most people don’t notice because they have fairly fast systems with sufficient RAM. Lots of software programming out there is shoddy and poorly written when it comes to leanness and efficiency, because the developers are either not skilled enough to write it properly, or they’re lazy. I generally like Firefox, but I think it’s dumb for the developers to settle on its current level of performance. If they’re not working to fix it, then they’re fools and they’ll eventually lose the marketing share that they’ve managed to claw away from the garbage of all software, I.E.

      I work all day long (and too many nights) on graphic arts and web development, between a dozen Macs and PCs. The issues with Firefox run across all of the various computers that I deal with, some more than others. In fact, if I want to get to the web fast, I usually click Safari or Opera, neither of which offer as much as Firefox, unfortunately.

    10. the sluggish start is actually a fault in the sqlite system, it doesn’t clean up after itself and the sqlite files end up as big as 100MB’s or more,

      I see speed improvements of more then 40% when i compact the sqlite files (data isn’t removed from the sqlite files when deleted or cleared, its overritten with useless data, which leads to the large sizes and slow profile loading)

    11. I’m using the latest 3 branch of Firefox beta now. The memory usage is still high. With a few add-ons & 8 tabs open it’s taking up around 196 Mb now. Surprise, with a similar setup IE 8 takes up only 39 MB, hoo!

    12. comparing a standalone browser to a browser thats integrated into windows. most of the DLL’s are preloaded via explorer.exe and various other applications.

      Not the wisest idea.

    13. Same thing (i’m pissed!), sorry but most people are not geeks , hackers and don’t give a damn about benchmarking and optimizing stuff.. i just want a browser that don’t stress me more them my work does!

      You’re not supposed to work for the machine!!! the machine should work for you!

    14. “…comparing a standalone browser to a browser thats integrated into windows. most of the DLL’s are preloaded via explorer.exe and various other applications.

      Not the wisest idea.”

      On the other hand, if Windows (or OS X) is the turf where Mozilla wants to play, then the Firefox team needs to get their act together and create a tight piece of software that surpasses the performance IE or Safari — even on the home team’s turf. That’s the nature of the biz, and if they don’t do a better job, I predict that very soon Firefox will begin to lose market share.

    15. Now that, Lonny, that i can agree with.

      They MUST get the sqlite cleanup function working in the browser, as allowing the file to balloon to massive sizes is also a cause of launch and browsing slowness.

    16. You forgot to mention if you are using addons or if you were not
      Addons take huge memory especially if you use more than 1
      The problem may be user oriented rather than Firefox’s side

    17. Re: http://neosmart.net/blog/2008/firefox-3-is-still-a-memory-hog/#comment-385291

      I second that Mahmoud. I’m surprised that a lot of folks who consider themselves to be logical and intelligent are writing off your post as if you made the whole thing up simply because their un-scientific tests did not yield the same results. Wouldn’t an object/analytic approach be to look at all the variables and form and test hypotheses? When you have a disparity of results in a test you can’t just pick the result you “like” or “prefer”. You form new tests.

      I found this article trying to fix what I thought was a memory leak in FireFox. A co-worker on my development team is seeing ballooning in memory usage by FireFox but I’m not seeing as much as he. Comparisons to IE are meaningless for the same reason previously stated: IE is integrated into the OS and so memory that FF is having to allocate for itself, in the case of IE, is allocated to the system. So basically, IE’s numbers are misleading.

      It is a well known fact that FF uses a lot of memory. I don’t mean this as a criticism – I love FF. But, denying that there is a problem, in light of the tons of posts on the WWW confirming it, is either illogical or just plain childish.

    18. nah, it just seperates the levels of Tech experience from user to user.

      I currently have about 54tabs open, and running on 344MB.

      my tweaks worked for me, and i have over 30 extensions installed.

    19. @Squall
      “nah, it just seperates the levels of Tech experience from user to user.”

      much like what happens on linux?

    20. I agree with others that once chrome gets the addon support firefox is finished. Mozilla is playing around with personas and new tab features when they should iron out the sluggish feel of firefox. Shoddy programming? What about the fact the vanilla firefox opens a new tab at the end instead of next to the current tab like it logically should? All other browsers do this accept firefox.

    21. I removed the Skype add-on and some other bug detection add-on and cleared my cache, download history, off-line data and cookies. I kept me browsing history and my saved passwords then restarted firefox and now its running at 130MB and jumps between 3, 5 and 11% CPU usage. I advise you try the same and report back. I think that its all of the crap I had in my Private Data that was making FF chug along. Give it a shot.

    22. Hey all…

      Almost time for FF3.1, but I think I have to say that I am having the same problem on my machine with 2GB RAM with FF3. I have tested firefox on openSuSE and XP (and a fresh reinstall of XP), and I have found that my firefox with about 5add-ons, starts at around 70mb, and after being open for about half-an-hour, it reaches 160mb! This is the case with 2 html tabs open!

      Also, at times, it starts to eat memory HUGELY, sooo big that the CPU %usage goes as high as 50% (one of my cores!).

      Funnily, this happens on both XP and Linux!!!

      Any ideas? I am a huge fan of FF3, so do not want to lose it!

      Thanks Mo

    23. 160MB is fine for a profile with browser.sessionhistory.max_total_viewers at default

    24. FF 3.0.8 As mentioned in a posting above, removed the skype plugin and saw memory footprint go from 1.1Gb (yes Gb!) to 97Mb.

      Most grateful for the tip.

    25. I just restarted firfox because it was using 3.3 GiB of memory. (yes that’s a G) The only plugin I have is the google toolbar. And I had it running for about two days. I used to use Google chrome on XP for this reason. I wish Opera didn’t suck. Maybe I’ll try Epiphany.

    26. Firefox is a memory hog, pure and simple, I’ve switched to Google Chrome and when I have compatibility issues I simply use IE.

      Problem solved.

    27. RE: http://neosmart.net/blog/2008/firefox-3-is-still-a-memory-hog/#comment-392548

      Scott the reason people are writing off Mahmoud is because they love FireFox so much they will argue that it is so wonderful and great no matter what anyone says. FIREFOX SUCKS! I haven’t even had it a whole day and I hate it already. It’s slow compared to IE and sucks up memory and bogs down the whole internet. I don’t really understand what is so great about that? I even have the pop-up blocker on and it doesn’t block half the stuff that IE’s popup blocker does. What is great about that? The only reason I got FF was because there is a site I wanted to check out but it won’t let you download files unless you have FireFox which is a really gay way to make people get something they don’t want. I notice when you bitch at site admin’s about this sort of thing they just say “Oh well Internet Explorer doesn’t follow web standards that’s why we don’t support it.” To me that is just another way of saying “We’re too fuckin lazy and stupid to code a website to be compatible with IE.” I mean, it’s not hard at all to code a fucking page to work in IE, but to purposely make shit not work just because you are using IE and not FF is bullshit. But ya know, kids nowadays love total crap, so it’s no surprise they love FireFox.

    28. Memory hog issue: Regardless of the max level of memory reached by Firefox after a session has been going on for a while, why is it that closing all but one window and closing all but one tab in that window, and going to the Google home page does not result in reducing the memory used? The only way I can reduce it is to close firefox altogether.

    29. I’ve had the same troubles. Just had to kill Firefox because it was using 78% of my 1GB of RAM. I watch it all the time (running Ubuntu) and it is always leaking memory until I have to restart it — usually when it gets up around 500MB. Sites with video especially seem to spike memory usage.

    30. I see that I neglected to say I am running on an older Dell with 750MB memory, using XP professional SP2.

      I download a lot of photos, but even more, I am on cnn.com and nytimes.com which have a lot of ads. and use My Yahoo as a news reader and open up some 10-15 tabs from these to read one at a time. At the end of this sort of session, I will close all but one tab, set that one to google.com (just about the least busy page on the web) and the memory NEVER reduces itself. Only when I close ALL the tabs and restart FFox do I clean up the usage.

    31. My firefox runs at 500 MB. It’s ridiculous. It has reached 800 MB before.

    32. Opera can open up so many tabs, install other plugins and etc..but the memory usage is just in an acceptable range…
      In Firefox case that I encountered and still having problem with it..that it’s really quite shocking the memory usage can go up as much as 2GB..and hogging the whole operating system…
      Mozilla still not fixing this issue and Firefox 3 is just all the same story repeating itself…

    33. FF has been, is and always will be CPU and resource hungry shite.
      Pardon to be that blatant, but it is the fact
      Only f**g browser to crash and bring a 2Ghz 2Gb RAM machine to its knees.

    34. Thanks for the blog, it was good and necessary to discuss real issues that some, if not a lot of people, have been and are still experiencing with a ‘simple’ web browser across multiple platforms. If people can’t discuss issues without others bashing and inciting hate, there’s a larger problem than with browsers. I really like Firefox and Seamonkey, but find it frustrating that the same issues I’ve experienced over the last couple of years remain to be issues, that memory management and resource capping haven’t become a better part of the code, especially with the onslaught of media sources available to websurfers and devs. Be nice if a Mozilla developer could magically appear at one’s household or workplace when the issues arise, and see the system crawl occur and gather intel to really pinpoint the source(s) and that work its way into the point release. (Please, no Moz devs magically appear at my work or household, safety warning issued).

    35. I’ve been testing Firefox 3.5 Beta 4 for a couple of days with a fresh profile and so far memory management seems to have improved considerably. The browser now uses about 110-120 MB RAM on my machine and one can see that memory is released when tabs are closed. This might also be attributed to the lack of extensions since half of the ones I regurarely use are not available yet. But given the fact that I use the bare minimum of extensions on 3.0 (Adblock Plus, Gears, Xmarks, Secure Login, GMail/GReader watcher) I doubt that they cause the leaks but arguably this would warrant further investigation.

      Which brings me to another point: Extensions and plug-ins are a reality and especially the usage of the former is actively encouraged by Firefox. Despite that, Firefox has no means that allows the user to measure CPU usage and memory consumption of individual extensions. The only way to find a misbehaving extension is through trial and error. AFAIK Google Chrome plans to enable monitoring CPU/memory usage for individual extensions similar to what they already have in place for tabs.

    36. FF 3.0.1.0 certainly does have a memory leak as far as I’m concerned. I restarted it about 15 minutes ago, minimal add-ons, with only this window open, and it is past 135k in memory and climbing (it started out under 60k, if memory serves, haha). I finally got sick of my computer fan running and went looking for a source, and I found it in this browser. Leave it for any length of time and it pushes 1 gb every time. I love the browser, but it’s a bit much.

    37. I run Firefox on numerous hardware and software platforms and although I have seen improvements in recent releases, Firefox still uses way more memory than it ought to. I am typing this in Firefox on Windows 7 with 3GB RAM and it sucks up 300-400MB RAM with less than 3 tabs open. This is just one example, but it is a memory hog, and it’s not platform specific or add-on specific either. Websites seem to have no relevance in my case either, it just takes up that much memory.

    38. Is there anyone out there who know how to manipulate or tweak/hack FF3 system files to further improve the memory usage. Using some XP like pagefile options to only use harddisk space to store the huge caches that FF3 uses.

      James is right tho, this memory issue are not caused by installing extensions or plugins or even just merely browsing the internet.

      If Opera browser can sort the memory usage efficiently and why can’t Firefox. One of the biggest improvement yet accomplished by Opera compared to other internet browsers.

      Maybe I should just stop complaining and use Opera already.

      But the coolest thing about Firefox that any other internet browsers doesn’t have are the plugins extensions especially the Firebug add-on.

    39. My places.sqlite is 188mb ,what can i do to make it smaller.
      My only problem is hang at exit it goes from 100mb to 480mb and I must allways end firefox in Task Manager.
      I disabled allmost all of my add ons (using only BB code and google toolbar) and disabled java

    40. Nice!
      I just deleted FF 188 megs places.sqlite file and it was all OK. I back it up but really dont need it.All bookmarks and stuff is saved ..too bad I did not do that earlier.

    41. I have my Ubuntu Firefox up to 1.3GB of ram. It sucks because I don’t want to have to restart firefox and then reposition all my windows over the multiple desktops I am running.

    42. I have to restart Firefox at least once every few hours to keep memory usage below 1 gig of memory. Once it gets above that it starts freezing every few seconds, though the other programs on my system will keep working. This is generally with about 20-30 tabs open and 3 extensions, though closing tabs has NO effect. This happens on both my home and work computers, though less at work.

    43. You have to look at what plugins / addons you have installed.
      I was running at 228Mb
      Then I removed the .NET “assistant”
      I also removed IE tab (since IE8 now allows IE7 view + M$ SuperPreview allows preview back to IE6)
      And finally I removed EditCss since I have FireFox.
      Now I’m at 55Mb

    44. Well, I now have only this in my FF.

      : Plug Ins:
      – Adobe Acrobat
      – Microsoft DRM x2
      – Mozilla Default Plug in
      – Shockwave Flash
      – Shockwave for Director
      – Windows Media Player Plug-in Dynamic Link Library

      AddOns:

      BB Code
      Google toolbar

      FF is at 184mb with 4 tabs open- This is normal i Think.

      Im writing coz I wonder if i can disable more plug ins

      Can I disable any of this plug ins without having a problem?

    45. Just going to chime in to say a few things, I doubt I’ll be back. This thread is a bit lengthy as it is.

      one) My firefox does the same thing as Mahmoud

      two) I also see this on multiple systems.

      three) Strangely I have vs 2008 running in most cases. ( also happens when not running, but its worse when vs 2008 is running )

      four) Ending ff3 is part of my daily routine.

      I love FF, its all I use, but I too wish they would take a Que and fix the memory issues. Its been apparent since I started using it pre 2.x. All of my friends says the same thing, “Yeah its a memory hog, but I love it ;)… So if its not a memory hog for you, then quit defending the fact its a non issue, it is for some of us..

    Leave a Reply

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