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.""

17 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. 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...

  3. 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 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.

  4. 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
  5. 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.
  6. 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!
  7. 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!

  8. 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
  9. 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.

  10. 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...

  11. 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.

  12. 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.
  13. Re:And Opera by daniel_newton · · Score: 4, Informative

    plugins (dlls) generally run in-process