Slashdot Mirror


Comparing Memory Usage of Firefox 2 vs 3

DaMan writes "ZDNet picks up on yesterday's Firefox 3 beta 1 review by comparing the memory usage of Firefox 2 against the latest beta. The results from one of the tests is quite interesting, after loading 12 pages and waiting 5 minutes, 2 used 103,180KB and 3 used 62,312KB. IE used 89,756KB.""

36 of 402 comments (clear)

  1. Yes, but... by InvisblePinkUnicorn · · Score: 5, Funny

    How much does it use on Linux... err... does it run... damn!

    Sorry, I'm new at this....

  2. And Opera by Anonymous Coward · · Score: 3, Informative

    is using 34mb (winXP)

    1. Re:And Opera by gEvil+(beta) · · Score: 4, Insightful

      I'm assuming you loaded the exact same 5 pages with the same ads that the ZDnet testers did?

      --
      This guy's the limit!
    2. Re:And Opera by morgan_greywolf · · Score: 5, Interesting

      Is it just me or does it seem like 60MB or even 34MB is a LOT of memory for something that browses Web pages?

      I mean, people used to make fun of GNU Emacs, saying things like it stands for eight megabytes and constantly swapping or eventually malloc()'s all computer storage. Emacs takes somewhere around 10MB or so on a RHEL4 box, and that thing is practically an operating system. It reads mail! Firefox doesn't even read mail, and it takes 60MB. Opera reads mail, but still 34MB seems just too big, too.

      Maybe I'm just getting to be a cranky old man. Now you kids get offa my lawn!

    3. Re:And Opera by Applekid · · Score: 4, Insightful

      IANAWBD (Web Browser Developer), but... there's just so much data for web pages now. You've got plugged-in interpreted flash code, graphics that need to be kept in RAW formats in memory because of speed, the full length and width of the page on an in-memory surface to pan through on a window.

      Even then it still needs a dynamic layout for CSS and scripting on the fly. And even then some scripting is safe, some is not, so there are rules that the code has to implement like pop-up blockers, password managers, warnings on insecure pages, warnings on cross-site scripting, etc. All that and the browsers STILL need to be able to sensibly parse and display completely borked pages with invalid HTML.

      Nevermind maintaining history, cache, cookies, referring pages, bookmarks.

      --
      More Twoson than Cupertino
    4. Re:And Opera by CastrTroy · · Score: 3, Informative

      Not raw like your camera raw, but raw uncompressed format. All those JPGs and GIFs and PNGs must be converted to raw or bitmap files to display them on the screen.

      --

      Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
    5. Re:And Opera by LizardKing · · Score: 3, Informative

      The "w3" web browser extension for Emacs can display images.

    6. Re:And Opera by tepples · · Score: 3, Funny

      Firefox doesn't even read mail citation needed
    7. Re:And Opera by forkazoo · · Score: 5, Insightful

      Is it just me or does it seem like 60MB or even 34MB is a LOT of memory for something that browses Web pages?

      I mean, people used to make fun of GNU Emacs, saying things like it stands for eight megabytes and constantly swapping or eventually malloc()'s all computer storage. Emacs takes somewhere around 10MB or so on a RHEL4 box, and that thing is practically an operating system. It reads mail! Firefox doesn't even read mail, and it takes 60MB. Opera reads mail, but still 34MB seems just too big, too.

      Maybe I'm just getting to be a cranky old man. Now you kids get offa my lawn!


      I used to browse the web on a machine with 8 MB of RAM. Total, including the OS. At the time, real time decoding of a JPEG was extremely difficult, but my current CPU has 100 times the clock speed and is 64 bit and has vector processing features. Yet, browsers still seem to make the same class of CPU-memory tradeoffs that made sense on a 68030. For example, I may have ten tabs open in a window. I can only see one of them at any given moment, but the fully decoded images are all sitting in memory for all ten web pages, despite the fact that the page could be re-rendered almost instantly on a modern system.

      Since browsing a few web pages is seldom the only thing I do with my computer, I go and do other stuff in Lightwave, Blender, Photoshop, whatever, then I come back to my web browser, and I wait while the whole working set gets swapped back in. Then, I click on the tab I want, and I wait while the working set for that tab gets swapped back in. If it just rerendered the page from the original bits, rather than using cached decoded images sucking up RAM and whatnot, it'd have almost nothing to reload and worst case performance would be orders of magnitude better. Hooray for "optimisation!"

      Oh, and can we get some ninjas to fucking kill Flash. Seriously, I shouldn't need a bunch of script blocking and flash blocking extensions just to be able to browse the fucking intarwebs without having a seizure.
    8. Re:And Opera by Entropius · · Score: 3, Insightful

      Yes, but it's equally inefficient for Firefox to have to swap this sort of thing in and out when the OS is under memory pressure.

      What we really need is a mechanism for e.g. Firefox to use large amounts of memory to speed up page loading when there's plenty of memory, but to optimize for a small memory footprint when I've got ten zillion Gimp windows and Picasa open.

      Why should Firefox behave in exactly the same way in two totally different situations?

    9. Re:And Opera by daniel_newton · · Score: 4, Informative

      plugins (dlls) generally run in-process

    10. Re:And Opera by rtaylor · · Score: 3, Informative

      Unfortunately that is an operating system problem.

      We need a way to tell the operating system that some memory is important and other segments can be dropped at any time (cached or precalculated data) provided the application is told so it can rebuild it when necessary.

      The OS scheduler would choose which applications are idle to the user and dump some of the applications data.

      --
      Rod Taylor
  3. Yeah but it's still beta by jayhawk88 · · Score: 4, Funny

    I'm sure that low memory usage bug will be fixed by the first release candidate.

    1. Re:Yeah but it's still beta by beh · · Score: 4, Interesting

      Actually, that 'low memory bug' has already been fixed - I've downloaded the beta and installed it on WinXP - after looking at 2 pages, Firefox 2 memory usage was at about 45MB; Firefox 3's memory usage was up to about 750MB after less than 5 minutes (and the same 2 pages; in two tabs, just as with Firefox 2.0.0.9), completely bringing the machine to a crawl (1GB mem; and apart from Firefox, Outlook, Eclipse and SquirrelSQL were open)...

      I'm reverting back to Firefox 2 for the time being, and will file a bug report once I have some more time to find out what's causing the issue...

  4. How are they measuring? by MyLongNickName · · Score: 4, Informative

    Are they using the handy dandy Task Manager? If so, this is not even remotely accurate. In the age of managed memory, this is an estimate at best. Don't believe me. Open up internet explorer, run it a while and look at the memory usage. Now minimize IE. Watch the number drop like a lead balloon.

    --
    See my journal for slashdot ID's by year. Mine created in 2005. http://slashdot.org/journal/289875/slashdot-ids-by-year
    1. Re:How are they measuring? by vally_manea · · Score: 3, Interesting

      From what I've heard this is common practice at MS. When the app gets minimized it releases/caches a lot of memory. There was a story on a MS person's blog but I'm to lazy to find it out.

    2. Re:How are they measuring? by Lemmingue · · Score: 5, Insightful

      The Working Set (physical memory) size will drop, but the memory consumption (Private Bytes, Virtual Memory) will be the same. When a window is minimized, Windows mark the memory pages as candidates to be relocated in case of memory shortage. When you restore IE focus the Working Set size will return to the previous size.

      Task Manager sucks, use Sysinternals' Process Explorer.

    3. Re:How are they measuring? by volpe · · Score: 3, Informative

      When you minimize, the working set size is reduced. This causes pages to be swapped out to the pagefile. When you maximize (or restore), the working set size is increased, meaning that the application is *allowed* to use more physical memory, but that doesn't mean it's going to immediately start loading back the same pages it swapped out. It's going to wait for page faults to compel it to do so. That is why #6 is lower than #2.

    4. Re:How are they measuring? by jafac · · Score: 3, Interesting

      Well - Microsoft may be distributing Sysinternals products; but Marc Russinovich's Blog postings are becoming less and less frequent.

      AND - Sysinternals used to distribute the source on some of their tools. No longer. It's out there. But it's not legal.

      --

      These are my friends, See how they glisten. See this one shine, how he smiles in the light.
  5. Strange, 1p/10 mins more than 12pp/5 mins? by Red+Flayer · · Score: 4, Interesting

    Firefox 3.0 b 1:

    Loading a five pages into the browser - 38,644KB
    Loading a single page and leaving the browser for 10 minutes - 63,764KB
    Loading 12 pages into the browser and wait 5 minutes - 62,312KB
    I wonder what would have happened had he loaded 12 pages and let the browser sit for 10 minutes -- would the memory usage still be less than the single page/10 mins test?

    Seems to me that memory usage must still spiral under 3 beta, otherwise how would the single page/10 min usage be less than the 12pp/5 min test? Sure, it's not as bad, but that number really caught my eye... more testing is in order if I can get some time away from the in-laws over the holiday.
    --
    "Trolls they were, but filled with the evil will of their master: a fell race..." -- J.R.R. Tolkien on Olog-hai
    1. Re:Strange, 1p/10 mins more than 12pp/5 mins? by CastrTroy · · Score: 4, Insightful

      Also, seems like a pretty crappy test to me, especially considering that most of the complaints with Firefox are with memory leaks, and not memory usage from opening a few pages. What happens after an entire work day of using the browser? Is there a significant difference in memory at that point? People who open their browser and look at 10 pages, then close it again will rarely ever have a problem with memory usage in Firefox. However, those of use who leave it open for days at a time, doing web development, and constantly looking at new pages are the ones who need to worry. It's like comparing the performance Visual Studio 2003 to Visual Studio 2005 on a project that only has 5 classes.

      --

      Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
    2. Re:Strange, 1p/10 mins more than 12pp/5 mins? by stony3k · · Score: 4, Informative

      Form the tests that the developers have been running, most of the memory leaks in Firefox itself seem to be fixed (there are probably still some left). However, memory usage still remains a problem. I think this blog post summarizes their findings. They've been using dtrace and other tools to find out exactly what is going on.

      Unfortunately, I think the damage to Firefox's reputation is already done. There are many people who have had negative experiences with Firefox who keep on harping about the "memory leaks" and I don't see how Mozilla devs can change this public perception.

      --
      Freedom is not worth having if it does not include the freedom to make mistakes. - Mahatma Gandhi
  6. Re:not to point out the obvious by ceejayoz · · Score: 5, Informative
    From the article:

    Both Firefox 2.0.0.9 and Firefox 3.0 b 1 were installed fresh using a standard install.
  7. What a stupid "test" by JeremyGNJ · · Score: 3, Insightful

    Seems like the author is playing up to some feature in FireFox 4 that releases un-viewed pages from memory after a certain amount of time.

    I bet if he re-clicked on each of the 12 tabs after the 5 minutes was up, that memory usages would go back up again.

    "using less memory" isnt always desirable. I have 4 GB of RAM in my system and i'd rather if the applications USED THAT RAM, to keep application response "instant", rather than un-caching stuff, only to pull it back into memory again when I want to see it.

    1. Re:What a stupid "test" by QuoteMstr · · Score: 4, Interesting

      Don't do that. "But I want to keep my applications in memory!" you might say. That's wrong. Virtual memory systems these days basically use main memory as a cache for the disk. It doesn't matter whether a page came from a file, an anonymous application allocation, or anywhere else. The kernel automatically keeps the most frequently used blocks in RAM and pages everything else out to disk. By using 0 for swappiness, you defeat that automatic management and force the kernel to treat application pages specially. You don't want to do that.

  8. Re:not to point out the obvious by ToLu+the+Happy+Furby · · Score: 4, Insightful

    You can enable extensions not explicitly marked as compatible with Firefox 3 beta by going to about:config and adding an entry for extensions.checkCompatibility : false. I'm running the same extensions and usage pattern as with Firefox 2 and performance is MUCH improved, especially AJAX performance on Gmail and shutdown/session recover speed. Of course, it has only been one day since my last FF restart. FWIW, I'm running about 8 extensions and have about 50 tabs open across 5 windows; currently on my 2GB machine Task Manager shows Firefox 3 using 235MB, where in the past Firefox 2 would easily consume ~450MB or even 600MB+ under similar workload. (Of course in the past I only checked Task Manager once FF's performance became noticeably slow, so this is not necessarily a good comparison.)

    Another point regarding your IE7 and Opera9 tests: as far as I know, all modern browsers choose to allocate more or less memory depending on how much memory the OS reports as available (certainly Firefox does), so users on different boxes can show very different results.

  9. Re:This is irrelevant by webmaster404 · · Score: 3, Insightful

    Because mostly on Windows, most people's RAM is stretched to the limit, if a simple program that people use every day (Firefox) will decrease memory usage, then they can focus on speed and in the end, if Firefox can be 2X as fast as IE, Konqueror(and by extension Safari), and Opera people will switch to it. And I actually have around 512 MB on both my Laptop and Desktop with the Desktop currently running Xubuntu and my laptop running Ubuntu 7.10 happily. And when Linux can resurrect a "dead" system like a crashed Windows system that someone may give you for like $10 that happens to have 256 MB of RAM on it and a slower but usable processor like a Pentium III, Linux can run fine on it however, if FF runs slowly, most people have little need for a computer if they can't browse the web with it.

    --
    There is no "disagree" moderation, and troll, flamebait and overrated are not valid substitutes
  10. Re:Yes, but... looking in the wrong spot! :) by damaki · · Score: 3, Informative
    --
    Stupidity is the root of all evil.
  11. Re:Memory still an issue for me... by magicsquid · · Score: 3, Informative

    I wish I had mod points, because this needs to be brought to people's attention. Everyone seems to be claiming victory over the memory bugs, but for me (and you and many others) there are still random problems.

    My system exhibits the exact same problem you describe. My Firefox will spike from around 66 MB of RAM usage to 700 then 800 then 900 and will just sit there chewing up more RAM until I kill it. I'd love to know the cause and even better, the solution to this problem.

    It is happening in FF2 and in the 3 Beta. It doesn't happen on the same site every time. It happens most frequently when using JavaScript, but not always. I can't seem to narrow it down unfortunately.

    --


    "Chances of RHIC-induced Armageddon are exceedingly rare, but... you never know." - MIT Physicist Bob Jaffe
  12. Re:not to point out the obvious by CastrTroy · · Score: 3, Interesting

    What about a task manager extension for firefox that shows how much memory each extension is using? Seems like it could be useful. I mean, we know how much memory firefox in general is taking up, but it would be nice to get a breakdown of where that memory is going to.

    --

    Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
  13. Just did this test in linux by Adult+film+producer · · Score: 5, Informative

    FC 6 .. kernel 2.6.22.. Firefox 1.5.0.12 vs 3.0b1

    I created a new user, logged in and loaded up FF 1.5.. opened up 12 tabs and logged into these sites

    www.bbc.co.uk
    www.slashdot.org
    www.dailykos.com
    www.news.com
    www.abc.com
    www.foxnews.com
    www.freep.com
    www.youtube.com
    www.youporn.com
    www.liveleak.com
    www.rawstory.com
    www.drudge.com

    Here are the numbers for ff 1.5. The first line is when it loaded up with 12 empty tabs. The second line is the 12 websites loaded initially.. and the third line is 12 minutes afterwards

      3876 perfume 20 0 175m 54m 38m S 0.0 14.5 0:18.19 firefox-bin
      3876 perfume 20 0 348m 124m 49m R 72.0 33.2 1:47.83 firefox-bin
      3876 perfume 20 0 338m 135m 49m R 46.8 36.0 7:30.93 firefox-bin

    I logged out, rm -rf ./.mozilla then logged back in and fired up FF 3.0b1.. same procedure, same 12 websites and 12 minutes of idling on them

      4231 perfume 20 0 202m 58m 38m S 3.6 15.6 0:11.79 firefox-bin
      4231 perfume 20 0 273m 106m 40m S 59.7 28.4 1:31.37 firefox-bin
      4231 perfume 20 0 254m 107m 40m S 1.3 28.5 2:27.26 firefox-bin

    CPU usage seemed to be much better with FF 3B1 as well.. not sure why the difference but everything was clean...

  14. Regrettably It Also Locked Up! by Toad-san · · Score: 3, Informative

    After about 2 minutes of use, 2 or three different pages online .. the new 3.0 slowed down my entire system to a crawl, and finally to a lockup. Had to pull the plug.

    Rebooted (Win2K, 2.8 MHZ Pentium 4, 1GB RAM), manually fired up ye olde Firefox, went to same pages, ran fine.

    Closed, re-ran 3.0 .. same problem.

    Sorry boys, not ready for Prime Time IMHO.

  15. Still giving issues by kryliss · · Score: 3, Informative

    I just downloaded and installed FF3beta, opened up slashdot and BAM....

    http://home.windstream.net/slashdot/pics/firefox3beta.jpg

    --
    --- If the bible proves the existence of God, then Superman comics prove the existence of Superman.
  16. Don't take it anymore by bunratty · · Score: 3, Insightful

    I don't see that memory usage remains a problem for most users. It's just the vocal few who are having memory problems. The main problem is that these users assume this is part of the "normal" experience of using Firefox, so they complain that every user must also be seeing the same thing. They take no steps to fix or report their problems, as they consider the problem to be "well-known" and think developers must be idiots for not being able to see it.

    If you're still having serious problems with Firefox, try creating a new profile and installing the Firefox 3 Beta. If you still have problems, discuss them on the MozillaZine Builds forum. If the problems do not get resolved, just switch to another browser. It's not normal to experience serious problems when browsing, so I don't see why anyone accepts it as part of the "normal" experience.

    I agree that the damage to Firefox's reputation is already done. I've found that no matter how many reports come out that Firefox doesn't have a severe and obvious memory problem, the few reports that show a problem are the ones that become popular. If any of them just included instructions to reproduce the problem on other computers, those reports would be productive. Somehow, they always seem to leave that part out.

    --
    What a fool believes, he sees, no wise man has the power to reason away.
  17. Re:Yes, but... looking in the wrong spot! :) by coolfrood · · Score: 3, Insightful

    That's a bogus argument. Virtual size is absolutely unimportant as far as the performance is concerned. You have a fixed amount of memory in the system and if Firefox takes up a lot of real memory, other parts of the system will feel the pain. The fact that the *real* memory usage of FF 3.0 is low means that it is not being greedy about using system resources. Every process has the full VM size to play with, so looking at the VM size doesn't really tell you much about what effect that process will have on the rest of the system.

  18. Re:Yes, but... looking in the wrong spot! :) by X0563511 · · Score: 3, Informative

    An excellent tool. Careful using it though, as it attaches to the system through debugging hooks and hence certain copy protection systems scream at you and make you reboot, and not run it... I'm staring at you SecureROM!

    --
    For large sets, this will be our guide even unto death, for the LORD will work for each type of data it is applied to...