Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
Mozilla The Internet Software

Real-World Firefox 3 Memory Usage Leads the Field 406

An anonymous reader writes "The author developed a program to snapshot memory usage per process every 3 seconds on Windows. Using this he recorded 3 hours of memory usage for five different browsers under real-world usage scenarios: Safari 3.1, Firefox 3, Flock 1.2 (a browser based on Firefox 2), Opera 9.5, and Internet Explorer 8. A million data points indicate that Firefox 3 has a surprising advantage over the other browsers tested. These are real-world tests and not contrived benchmarks."
This discussion has been archived. No new comments can be posted.

Real-World Firefox 3 Memory Usage Leads the Field

Comments Filter:
  • by xmas2003 ( 739875 ) * on Tuesday June 24, 2008 @04:28PM (#23924725) Homepage
    Interesting test - pretty amazing how FF3 basically flatlines at around 120 MBytes for over 2 hours of usage ... would have been interesting if the same methodology could be used with FF2 to see how much of an improvement FF3 is over that and how well the leaks were fixed. [komar.org]
    • Cue Iraqi spokesman

      There are no memory leaks. All memory usage is as we intend it to be. Any reports of leaks are lies by people who do not understand our page caching system. The infidels will never take Baghdad.

    • by Mascot ( 120795 ) on Tuesday June 24, 2008 @04:35PM (#23924855)

      The article states FF3 is an improvement over FF2, without offering data points for FF2. However, it also mentions Flock is based on FF2, so I'm guessing they've assumed the Flock data is representative for FF2.

      • Re: (Score:3, Insightful)

        by Enderandrew ( 866215 )

        It would have been interesting to include the Flock 2.0 beta, which is based on Firefox 3, and IE 7. I don't think many people are using IE8 yet.

        I'd also throw in a minimalist browser like KrazyBrowser for fun.

  • by Anonymous Coward on Tuesday June 24, 2008 @04:29PM (#23924749)

    I find that for certain hours of the day (namely in the evening) My memory usage skyrockets. It probably has to do with the increased number of images I am loading :D

  • by Anonymous Coward on Tuesday June 24, 2008 @04:31PM (#23924789)

    IIRC the memory displayed in process manager isn't necessarily the memory requested/used by the program, but merely what Windows has allocated, partially based on the applications requirements and partially based on what Windows _thinks_ the program needs.

    As such there's room for applications to look like they're using more memory than they are which can lead to misleading stats. If this test has only taken into account the memory windows has allocated it doesn't necessarily act as a measure of how efficient the program is at least, just how good it is at playing Window's memory management system.

    • by Evanisincontrol ( 830057 ) on Tuesday June 24, 2008 @05:04PM (#23925235)

      Ok, I see your point. Let's pretend Browser X is using dirty tricks with Windows's memory management system to shrink down how much memory is allocated to it. Browser Y is not doing that and appears to be less efficient.

      Well and good, but it's irrelevant. The remains that Browser X is taking less memory from Windows's pool of resources. It doesn't matter how Browser X is doing it or how efficient Browser X being with the memory internally, it is a solid truth that Browser X is using occupying fewer system resources than Browser Y.

      It's really a moot point, because it's unlikely that the developers of Browser X knew any "cheats" that would let them use substantially less memory than every other browser out there.

      • Re: (Score:3, Interesting)

        by cgenman ( 325138 )

        Or, of course, Browser Y takes more memory and caches more of what you're using, whereas Browser X hits your network more often. Browser Y might feel more responsive to your input. Browser Y might also be very efficient at freeing resources as the system needs, so that the actual system footprint is negligible, but unused resources are utilized efficiently.

        Of course all of that is speculation. Comparing browser based upon RAM footprint when they're all trying to cache the entire internet seems ridiculous

  • by scatters ( 864681 ) <mark@scatters.net> on Tuesday June 24, 2008 @04:33PM (#23924809)

    Service Not Available.

    At the time of posting this, there were like, 10 comments in the thread. Assuming that only 10% of all /.ers RTFA, that means that the site can support only 1 simultaneous user.

    • by arth1 ( 260657 )

      You're incorrectly assuming at least two things:

      1: That all readers are posters.
      2: That there is a correlation between looking at a page and number of connections. Very few clients use a single HTTP 1.1 persistent connection, and even fewer one that will stay open after all elements have been fetched. Lots of clients use multiple connections, and lots of clients use non-persistent connections, closing each of them down as soon as they're finished fetching a single object. The latter is especially common

    • i believe general participant to reader ration around the net is around 5 - 10%. if 100 users use a service, 5 posts on it and such.
      • Sigh! I know, but an analysis of the probable intersect between the sets of "Slashdot users who read the thread", "Slashdot users who read the linked article" and "Slashdot users who post" would have been tedious. Besides which, 99% of all statistics are made up on the spot, including this one.

    • Re: (Score:2, Funny)

      It's IIS, it probably ran out of licenses.
  • by MessageDrivenBean ( 534518 ) on Tuesday June 24, 2008 @04:33PM (#23924825)
    Already /.-ed? Or do I have to use any of the mentioned browsers... :-)
  • Bah. (Score:5, Funny)

    by Anonymous Coward on Tuesday June 24, 2008 @04:33PM (#23924827)

    If they didn't compare with Dillo/lynx, it's meaningless. Also, already slashdotted.

  • Terrible reference (Score:5, Insightful)

    by toleraen ( 831634 ) * on Tuesday June 24, 2008 @04:37PM (#23924899)
    Between:

    These aren't stress tests, and I probably never went over 4 windows in each browser, with at most 3 tabs in each window.(Emphasis mine)
    and
    .the individual numbers should not be compared to each other...

    ...how is this supposed to be taken seriously? "Contrived benchmarks" at least provide consistent and reliable results. They may not provide a completely accurate picture of real world browsing, but it's a hell of a lot better than this anecdotal "test".
    • by CyberLife ( 63954 ) on Tuesday June 24, 2008 @04:45PM (#23925011)

      This was my first question too. Real-world testing is all well and good, but how controlled was it? What assurances do we have that his results really paint the picture he claims and not something else?

      Note: The site is down so I haven't read the article yet. I'm guessing it fails to address this concern?

      • There honestly was no control, below is all he talked about what type of pages he does:

        Just regular stuff
        These aren't stress tests, and I probably never went over 4 windows in each browser, with at most 3 tabs in each window. I didn't look at many pages that are extremely heavy on images, and no "browser benchmark" style pages. Gmail was used on each browser.
      • Re: (Score:3, Insightful)

        by dreamchaser ( 49529 )

        Should have gone to the exact same pages and clicked the exact same links in each browser. Without doing that this is totally meaningless. That being said, I'll be happy if FF 3 doesn't leak as much memory as FF 2 or IE X.

    • Re: (Score:2, Troll)

      by LordMyren ( 15499 )

      The fact that he only had 4 windows open is also pretty hilarious. I usually have a couple dozen windows open, and just opening Firefox 3 in that environment (not doing anything) takes about 900 MB of ram.

      He makes no effort to find out whether "memory" being used is just buffered files (which can be dropped at any point) or data (which must be swapped out).

      Also, Opera will use exactly as much memory as you tell it to. He makes no mention of how much memory he told Opera to use. I have a laptop with 232 M

  • Wait (Score:4, Informative)

    by Mensa Babe ( 675349 ) * on Tuesday June 24, 2008 @04:38PM (#23924911) Homepage Journal

    Don't get overexcited just yet. Let me quote some of the most important parts of the article that were completely overlooked in the summary for some reason:

    "These results are from opening Memory Watcher and then using the browser between 9,000 and 11,000 seconds (close to 3 hours). Each browser is tested in a separate session, and there are brief periods of inactivity throughout the time period. [...] The above profiles are not a direct comparison in any way, but they offer a visualization of trending in the memory behavior of the layout engines and interfaces. [...]These aren't stress tests, and I probably never went over 4 windows in each browser, with at most 3 tabs in each window. [...] An automation script will never give the same insight into performance over time as will this sort of profile." [emphasis added]

    In other words, it is evident that there was no guarantee whatsoever that every browser would display exactly the same sequence of web pages. It is easy to jump to conclusions that if Firefox has used the least memory then it must "[have] a surprising advantage over the other browsers." But is it a logical course of reasoning? Or only a post hoc ergo propter hoc fallacy combined with wishful thinking? The truth is that the amount of memory used during an hour of downloading web pages is strongly correlated with the speed of downloading and displaying said web pages. Is it the case that Firefox couldn't download, format and display pages as quickly as Internet Explorer because of the native Windows internal API hooks that help Explorer work faster than any independent browser could possible aspire to? That is quite possible. Unfortunately the results of that experiment are inconclusive and the methodology was unreliable.

    • the native Windows internal API hooks that help Explorer work faster than any independent browser could possible aspire to?

      Can we get over this urban legend please? There aren't any such "native Windows internal API hooks" - unless you can give references? FWIW I used to distribute a hacked up Wine that could install and run IE6 just fine (this was several years ago). It started faster and browsed just as fast as native Mozilla did, but that was because it was tightly written, not because of cheating.

    • Re: (Score:3, Interesting)

      by mapkinase ( 958129 )

      "Or only a post hoc ergo propter hoc fallacy combined with wishful thinking?"

      There is no "post hoc ergo propter hoc" here. There is only "hoc", because people are measuring exactly what they need: memory usage. "surprising advantage over the other browsers" is not "hoc", because it is not an event, it is just logical conclusion of two things: Firefox using less memory than other browsers and using less memory is advantage.

      The experiment observed did show less memory used and the conclusion is very logical.

  • If slashdotted (Score:5, Informative)

    by Anonymous Coward on Tuesday June 24, 2008 @04:39PM (#23924929)
    Final memory usage in MB
    Safari 636.9
    Firefox 3 111.8
    Flock (Firefox 2) 191.9
    Opera 9.5 190.6
    Internet Explorer 194.4
  • by Idaho ( 12907 ) on Tuesday June 24, 2008 @04:40PM (#23924947)

    As the server is (already!?) down, I didn't yet have a chance to RTFA. So perhaps it is in the article somewhere, but I couldn't help wondering: how did they actually measure memory usage?

    I'm asking because, these days, that pretty much amounts to rocket science.

    Different operating systems report memory usage differently, even between different versions of the same OS (yes, I'm looking at you, Vista vs. XP). If they used "top" or its equivalent, it matters a lot whether they looked at real usage, virtual memory size (can be huge but that doesn't say anything) or what-have-you. Some OS's cheat quite a bit in what memory is reported as being "free" or "available", as well. Then we get to questions like "does it include the size of shared libraries", if not, is that fair if the libraries are really only used by that one application? Etc. etc.

    So I'm not saying memory using doesn't matter (it very much does), it's just hard to measure it exactly. And, any attempts at doing so, should be documented precisely.

    • by jd ( 1658 ) <imipak AT yahoo DOT com> on Tuesday June 24, 2008 @04:49PM (#23925063) Homepage Journal
      I don't know about these guys, but since most of these will be dynamically linked files, I'd probably be looking for ways to trap the malloc library calls, in much the same way as most of the debug malloc implementations do for various Unixes. If you track the maximum usage and the unfreed total, you can determine the memory consumption and memory leakage without relying on any system-specific interpretation of what memory is.
      • by Idaho ( 12907 )

        That sounds like a nice approach, didn't think of that. I highly doubt that this is how most of such experiments are conducted though.

        Possibly valgrind could be adapted to keep track of and report these numbers; if it doesn't already, that is (I have not used it recently, it didn't do this when I last used it a few years ago)

    • From the article:

      About the "Memory Watcher" Memory Watcher is a small program I wrote that records the memory usage of each process on the system every three seconds. It uses the PrivateMemorySize64 long value from the Process collection in .NET.

      * Simple
      There are tools similar to this, offered on every platform, but they are not usually easy to use. Memory Watcher provides a super-easy way to monitor every process and silently work in the background.
      * Exports to spreadsheet
      It exports the currently viewed data to a CSV file. These data are easily taken into Excel, and were used for the graphs in this article.
      * Implementation notes
      The application uses a DataGridView control, and sets its DataSource property to a DataTable which is built from the object collection. It uses a Timer to poll the system every 3 seconds. It offers searching and filtering of processes using a TextBox.

    • by Tweenk ( 1274968 ) on Tuesday June 24, 2008 @05:19PM (#23925419)

      The OS was Vista, and the program was written in .Net to use the function PrivateMemorySize64 [microsoft.com]. MSDN says it returns "the amount of memory which cannot be shared with other processes". It also says it's the same as the "Private Bytes" value in taskmon. Probably it means that it's the amount of memory the process received from mallocs (or rather GlobalAllocs/LocalAllocs/HeapAllocs), and which can't be assigned to some other process.

      It's worth noticing that the guy bothered with a GUI and an interactive filtering option for such a simple program. I wonder whether he ever heard of CLI, because it looks like a perfect fit for this kind of program.

      By the way, why not post CoralCDN links (append .nyud.net to hostname) instead of direct links when the site in question is small and likely to be Slashdotted?

      • It's worth noticing that the guy bothered with a GUI and an interactive filtering option for such a simple program. I wonder whether he ever heard of CLI, because it looks like a perfect fit for this kind of program.

        For what it's worth, throwing together quick GUIs for things like this in .NET is so fast and easy, I typically do it for things like this, where I'd make a CLI when working with anything else.

        I mean, being the "heir to Visual Basic" (among other things) is kind of a mixed bag, but in this speci

  • by Anonymous Coward

    I can't be arsed to do this properly. There are a lot of graphs and stuff. But here are the text bits. Pure copy and paste. No formatting. Live with it.

    Web browser performance is an often talked-about and flaunted thing, but many claims are not really backed up by solid evidence. I wrote software that collected millions of data points over 14 hours of actual browsing time, and this article reveals my findings.

    Problem

    Many people load hundreds of web pages, sometimes at the same time, often over periods of 3+

  • by SgtAaron ( 181674 ) <aaron@coinet.com> on Tuesday June 24, 2008 @04:50PM (#23925077)

    I've been blessed with using a Duron 950Mhz with a gig of RAM, lately. Quite speedy. Heh. But I've used worse, as many can no doubt also say. Oh, and an GeForce4, and of course the X Window System. :-)

    I've always used Firefox, and Netscape before that, on my linux desktops. I must say that I tried Opera lately, for the first time, and found its rendering to be very spry. The difference was most noticable for me when loading very large web pages, or very detailed with lots of tables and such. The latter was our nagios service detail page, which the rendering in Opera was quite noticeable in its quickness.

    So I get to be torn now, maybe, speed vs lean...
    I do like speed. Opera's memory use doesn't seem to be so excessively bad as to negate the optimizations they seem to have coded into the rendering.

    Aaron

  • by Last_Available_Usern ( 756093 ) on Tuesday June 24, 2008 @04:51PM (#23925087)
    While it's admirable that it's the leanest of the bunch, if I have 2GB of memory and over half of that is unused at the moment, do I really care if my browser uses 25MB instead of 40MB? I would think the speed with which the browser (and subsequent windows) opened, as well as how quickly it loaded plug-ins and other embedded media, would be of more importance.
    • Definitely important (Score:5, Informative)

      by XanC ( 644172 ) on Tuesday June 24, 2008 @05:04PM (#23925231)

      In the case of Firefox, memory usage has ranged from 25MB to $MEMORY_AVAILABLE. Which sucks no matter how much you have.

    • It's not about you or minority of users having 2GB of memory. Firefox is free, and memory costs $$. Firefox gives you extra memory for free compared to other browsers.

    • Well, your OS allocates that memory. In the case of Windows, if you hit 40 MB once, it very well may leave that much dedicated to FF, even if it's only using 25 MB internally. So, you have dedicated, unused RAM.

      I think on Linux, how fast it will put allocated and unused RAM back to the pool will depend on the vfs_cache_pressure, but I'm not sure about that, as that reclaims inodes from cache to make room for the buffers. VM management always confused me.
    • by AbRASiON ( 589899 ) * on Tuesday June 24, 2008 @07:01PM (#23926639) Journal

      I couldn't agree more, I want an incredibly incredibly snappy browser, I don't care how much resources it requires.

      I have a theory and I'm convinced of this theory that cache in browsers simply has been broken, since the beggining
      I've used netscape, ie, ffox, netcaptor and god knows what else and no matter how big I set the cache or how regularly I hit sites, they still seem slow to load images and content.

      Perhaps it's the complexity of the pages has scaled up, I spose that is possible.
      I've gone from browsing on a Pentium 166mmx with 32mb over the years up to a quad core 3.2ghz machine with 4gb of ram and moved from 128k dsl / 512k dsl / 1.5mbit dsl / 8mbit dsl and 18mbit dsl.

      I am impatient, make no mistake but surely if we're just throwing images and text around, these damned things should be snappier?
      FFox 3 is definitely a move in the right direction, it's noticably faster than FFox 2 but I still find moving back / forward, clicking links and interaction in general should still be faster :/

  • by Curien ( 267780 ) on Tuesday June 24, 2008 @04:52PM (#23925097)

    My wife and I share a computer. She uses mostly uses Firefox, I mostly use Opera. This is on a 64-bit Ubuntu Hardy.

    I have noticed no difference in her memory usage since we upgraded to FF3. I used to regularly have to kill her browser every once in a while (maybe once or twice a week) because it was eating up all the RAM. Since we upgraded to FF3, I can see no difference in memory usage.

    For example, right now FF is using 300MB resident, Opera is using 100MB. Flashblock is installed on both browsers. Granted, that's not a terribly good test considering we've been browsing to different sites, but I've found that those numbers are fairly stable. FF usually levels off in the 300-500MB range, and Opera in the 100-150 range.

    YMMV.

  • Irrelevant... (Score:4, Informative)

    by at_slashdot ( 674436 ) on Tuesday June 24, 2008 @04:58PM (#23925175)

    That's pretty much irrelevant to me, I switched back to Opera because of performance issues.

    Memory != performance.

    For example, when I open a new tab in opera the CPU doesn't register almost any change, when I open a tab in Firefox it goes almost to 100% (that's in Linux, with many extensions added, and BTW, I need those extensions to duplicate Opera's features)

  • I really wish it would stop crashing every 15 minutes.
    • by tepples ( 727027 )

      I really wish it would stop crashing every 15 minutes.
      Have you tried installing Flashblock? I've been told that defects in Adobe Flash Player cause a lot of the crashes and leaks commonly attributed to Firefox.
  • After all, we've been able to plug in a decent garbage collector into sloppily written C programs for 15+ years now [hp.com] ...
  • K-Meleon. I'd love to see how it compares to FF, though it would be best to wait for it to be updated on same Gecko renderer as FF3 uses.

  • Safari feels snappier...

    Sorry, might be an inside joke in Mac user forums, but I think there is enough crossover on /.
  • Even if Firefox 3 used ZERO memory, I'll still never use it because of the trainwreck that is the poorly-named Awesomebar.

    Some things are more important than resource conservation, such as not screwing the user by needlessly taking away functionality and telling them "you'll get over it".

    I'd gladly have Firefox 3 with the same footprint as Firefox 2 if that's the price to pay for keeping the old address bar autocomplete functionality in the code.

    • Re: (Score:3, Informative)

      by MrFlannel ( 762587 )

      On the off chance you're not just trolling...

      Instructions are here:
      http://www.kennycarlile.net/2008/06/17/disable-firefox-3-awesomebar/ [kennycarlile.net]

      Took me all of 10 seconds with google: "Firefox3 Awesomebar disable". So... I guess you'll enjoy firefox 3 with the smaller memory footprint (assuming TFM is correct).

      • Re: (Score:3, Insightful)

        Parent is not informative.

        Took me all of 10 seconds with google: "Firefox3 Awesomebar disable".

        And yet, that page is absolutely not what the GP was asking for.

        To quote:

        Some things are more important than resource conservation, such as not screwing the user by needlessly taking away functionality and telling them "you'll get over it".

        I'd gladly have Firefox 3 with the same footprint as Firefox 2 if that's the price to pay for keeping the old address bar autocomplete functionality in the code.

        gumpish--and I, and a lot of people as far as I can tell--want the "classic" (read: FF2) location bar behavior. There is currently no way to get that in FF3. There used to be an about:config setting for it in some of the betas, but they took it out and told those people who liked the old functionality to shut up and deal.

        The about:config tweaks on the page you linked to will disable the location bar dropdo

        • Re: (Score:3, Informative)

          by MrNemesis ( 587188 )

          Damnit, can't use mod points in this thread now.

          The way I've found to restore sane address-bar behaviour was to do the following:
          Install the oldbar extension
          about:config browser.urlbar.matchOnlyTyped boolean set to true.

          Bingo! No more hyper-annoying address bar.

  • I'd like to see this same test measured over performance (mem over load time) - that would tell us something interesting. The working set numbers are somewhat arbitrary, that is the allocation scheme they may have been "optimized" by the dev team in some way. The fact Safari isn't capping it's own usable makes me want to see why that is.

  • Not on OSX (Score:3, Interesting)

    by thejuggler ( 610249 ) on Tuesday June 24, 2008 @07:34PM (#23926951) Homepage Journal
    They may have the Windows version memory under control, but the OSX (Leopard) version of FF 3.0 is still a PIG. Just starting up FF with 6 tabs (1 is Slashdot) and the memory usage is over 160Mb and virtual memory used is over 900Mb.

    And did they have to make the OSX skin so darn ugly?
  • by JohnsonWax ( 195390 ) on Tuesday June 24, 2008 @10:55PM (#23928859)

    that unused resources are wasted resources? If Safari has enough RAM to cache everything, why shouldn't it? Now, run the same test with 512MB RAM and see if memory consumption does the same thing.

    That's really what I want to know - not how much it uses, but how willing the browser is to give it back when other processes need it. That'd be useful.

We all agree on the necessity of compromise. We just can't agree on when it's necessary to compromise. -- Larry Wall

Working...