Forgot your password?

typodupeerror
Mozilla The Internet Businesses Google

Memory Usage of Chrome, Firefox 3.5, et al. 505

Posted by kdawson
from the gig-here-gig-there-pretty-soon-it-starts-to-add-up dept.
An anonymous reader writes "This experiment graphs the memory usage of Chrome and Firefox 3.5 (along with Safari and Opera) over a series of 150 Web page loads using an automated script. Firefox 3.5 shows the lowest memory usage in all categories, including average memory usage, maximum memory usage, and final memory usage. Chrome uses over 1 GB of memory due to its process architecture. Safari 4 and Opera show memory usage degradation over time, while Chrome and Firefox 3.5 are more reliable in freeing memory to the OS." IE 8 was not included "because the author could not find a way to prevent it from opening a new window on each invocation of the command."
This discussion has been archived. No new comments can be posted.

Memory Usage of Chrome, Firefox 3.5, et al.

Comments Filter:
  • Re:Finally... (Score:3, Interesting)

    by Banacek (994201) on Sunday June 21 2009, @01:35AM (#28408051)
    http://img12.imageshack.us/img12/7330/picture1uo4.png [imageshack.us]

    Firefox is still my browser of choice, due to the plug-ins I use daily. I have to wonder how Flash intensive the sites loaded were.

  • Pfft. (Score:5, Interesting)

    by solios (53048) on Sunday June 21 2009, @01:38AM (#28408069) Homepage

    I use Firefox and Safari regularly. I use two web browsers because each one does something vastly better than the other. Firefox for porn and online transactions, Safari for basic day-to-day anything that might include bookmark management (long story short, every browser I've used EXCEPT safari still does bookmark management using some variant of the horrific Netscape method - this includes IE, Mozilla, Firefox, etc - whereas Safari is the first browser I've used that does it in a non-bullshit fashion). However, useable as it is for bookmarks, Safari's a dick when it comes to password management and a few other things - most notably, how the browser handles while the system is paging out or otherwise shot in the ass with RAM overuse from other applications.

    Long story short, under ANY kind of system load - we're talking ANYTHING above IDLE - Firefox is more responsive than Safari. When the system is shitting gold plated bricks trying to deal with the demands After Effects or Photoshop or Final Cut Pro is putting on it, Safari is beyond useless... and Firefox is responsive.

    It all boils down to memory usage. Specifically, Swap/pagefile useage. On the Mac, firefox seems to be more responsive under load while safari is LESS responsive under the same conditions - it has ultimately has nothing to do with RAM usage and everything to do with how the respective applications use swap/pagefile.

    Eat as much ram as you like... but until Apple does something about disk I/O, stay the HELL away from swap - or I'll use the application that does. (namely, Firefox.)

  • Re:IE8, huh? (Score:3, Interesting)

    by Frosty Piss (770223) on Sunday June 21 2009, @01:45AM (#28408109)
    I think you are full of shit.

    On one of my machines, IE8 is slightly faster than FF. But on my old slow machine, IE8 is *much less* of a memory pig, so much so that I had to drop FF simply because after awhile with a few tabs open, it slowed my machine to a crawl and eventually required me to kill it in the Task Manager.

    Some people have tried to tell me that I just don't know how to set FF up to run efficiently. I say that I shouldn't have to.

    I'm not happy about this because *I am not* a "whatever works" guy, I very much want to support OSS and spacifically FF. But it just doesn't work for me. Right now. Yet.
  • Re:Finally... (Score:5, Interesting)

    by Frosty Piss (770223) on Sunday June 21 2009, @01:52AM (#28408149)

    Finally, this should stop perennial "firefox is a memory hog" trolls. Hopefully.

    This really hasn't been my experience, and I am not trolling. My experience, which is to say what actually happens to me when I am surfing , is that after awhile with a few (2 or 3) tabs open, FF memory usage rises to the point where my machine crawls to a stop, and I have to kill FF with the task manager.

    Why is my FF experience different than the average FF fanboy? Why this is, I don't know. I do know that I am unwilling to get "under the hood" and edit config files, because I don't think I should have to.

    This is my experience as what I believe to be "average" use.

  • by Trepidity (597) <[delirium-slashdot] [at] [hackish.org]> on Sunday June 21 2009, @01:55AM (#28408161)

    Is the Linux version of Firefox particularly horrid or something? When using more than 10 tabs or so, my memory usage is typically in the 600mb+ range. It's currently taking 1.1g resident for about 40 tabs. I'm on x86-64, but even if we assume there's a full doubling of RAM usage due to the architecture, that's still 550mb equivalent, which his test never hits even with 150 tabs.

  • Re:IE8, huh? (Score:3, Interesting)

    by Anonymous Coward on Sunday June 21 2009, @02:01AM (#28408195)

    Seriously? I've never seen IE8 take up less memory than FF, ever, for any combination of pages. Right out of the box, FF is much lighter weight.

    I can't imagine what you were doing wrong.

  • by iYk6 (1425255) on Sunday June 21 2009, @03:03AM (#28408515)

    You test all the browsers except the most up-to-date version of the most popular one. In other words, the one that matters the most.

    Benchmarks are for people who choose software. Only a small minority choose IE. In a way, IE8 was included. It failed to compete due to lack of necessary features.

  • Re:It doesn't matter (Score:4, Interesting)

    by amirulbahr (1216502) on Sunday June 21 2009, @03:09AM (#28408549)
    It matters a lot in thin client scenarios. You want as many users as possible on the same server. Importantly, you want idle sessions to be friendly to the system by releasing as much memory as possible.
  • He was probably referring to things like the plugins that make Firefox's tabbed browsing not suck. It's a sad state of affairs when the browser that introduced tabs to the masses (not the first, but the first with more than about 5% market share) now has one of the worst tabbed interfaces by default. No tab groupings, no jumping back-and-forth using Ctrl-Tab (it cycles through the whole list instead), etc.

  • Config (Score:2, Interesting)

    by szundi (946357) on Sunday June 21 2009, @04:09AM (#28408775)
    I would really like to see this benchmark repeated with half and double of RAM available.
  • by Anonymous Coward on Sunday June 21 2009, @04:23AM (#28408825)

    In these environments, memory allocation is an extremely important capacity planning criterion for application deployment.

    \\ would love a Firefox addon or web proxy for remote desktop environments that dynamically rewrites the header of flash movies to allow globally reducing the playback frame rate to something arbitrary (like 2fps), as it would much more user-friendly than blocking flash altogether. I would site-license 1000 copies of that sucka tomorrow...

  • by julesh (229690) on Sunday June 21 2009, @05:37AM (#28409219)

    This is simply not true for things like web browsing. How are you going to "recompute" a web page the user visited 10 minutes ago? The only way to make going back to that page fast is to cache it. RAM is a fine way of caching things.

    There are a variety of tradeoffs possible. Do we:

    1 Just store the original HTML/compressed images? This was Netscape's original solution, and works reasonably well.
    2 Store parsed HTML, to prevent a reparse stage being necessary when redisplaying the page?
    3 Store uncompressed images, to prevent decompression being necessary when redisplaying the page?
    4 Store the DOM and layout information, to prevent relayout being necessary when redisplaying the page?
    5 Store an image of the page as it was shown to the user with their browser size/settings as they were when it was last shown?

    Each of these successively takes less cpu time but uses more memory than the previous. Firefox does the latter, and I'm not at all convinced that is the right point in the tradeoff. Redrawing the page image from the DOM should take only a few milliseconds. Recalculating the DOM and layout is more intensive, but still not likely to take long. I'm not sure which of 3 or 4 I think is best, but I suspect it is one of those. Although even 2 is worth considering, as it is a substantial memory saving compared to 3, and probably wouldn't take too long.

  • by something_wicked_thi (918168) on Sunday June 21 2009, @06:18AM (#28409379)

    It is for sure not easy, and saying "someone competent" indicates how much you have thought about it. Which is not much at all.

    Try not to betray your ignorance so readily. On Linux, you can get something pretty close by summing all the rw sections of /proc/self/maps and then counting the r sections once. External programs don't matter, obviously, because they're all the same for all browsers, so if you count them or not, it's the same result, just so long as you do things consistently.

    Someone with more Windows knowledge can probably tell you how to do this with Windows. I'm pretty sure you can get the loaded module list with Windows, at least, and maybe even some information about how much memory each is using.

    Again, someone competent would know this. Just because it's hard doesn't mean someone competent can't figure it out. I've done this kind of thing plenty of times, though on Unix OSes, so save your condescension for the peanut gallery.

  • Re:Finally... (Score:5, Interesting)

    by smoker2 (750216) on Sunday June 21 2009, @06:34AM (#28409465) Homepage Journal
    Exactly. I think I've su'd once in the last month, and that was yesterday to mount a ram disk to use as the Firefox disk cache. That was a nice tip BTW, significant speedup in page loads and UI responsiveness.

    mount -t tmpfs -o 'size=100M' tmpfs /path/to/chosen/mountpoint

    Create an about:config preference called browser.cache.disk.parent_directory with a string value of /path/to/chosen/mountpoint .

    You do need to restart the browser for it to take effect. I also chowned the ram disk to my user name so that FF can write to it. 100MB is probably a bit too big, but when I set it as 50MB it filled up. I'll tweak it later when I see what is usual for the cache. It's currently running at 47.47MB with 2 tabs, and I'm not anal about avoiding closing the browser if I'm not using it.
  • by eric-x (1348097) on Sunday June 21 2009, @08:04AM (#28409801)
    Well I had 7 tabs open in chrome (youtube, gmail, gamespot, slashdot, wonderhowto, and a few lightweight sites) I duplicated these to firefox.

    The about:memory in chrome gave me this:

    Browser             Private     Shared     Total     Private     Mapped
    Chromium 2.0.172.31 168,244k    4,472k    172,716k    190,248k    42,868k
    Firefox 3.0.11      151,384k    5,332k    156,716k    142,432k    3,968k

    FF plugins are disabled.

    According to chrome, 'private' is the best indicator.
  • Re:Opera (Score:5, Interesting)

    by A Friendly Troll (1017492) on Sunday June 21 2009, @09:04AM (#28410023)

    Interesting to see that Opera is not the memory sipping, lightweight browser that it's proponents make it out to be.

    Opera has advanced memory caching. When you close a tab, it remains cached in RAM. If you decide to undo the operation and reopen it, nothing is usually reloaded from the disk cache or the network (Opera even keeps the tab history cached, so you can go back and forward with lightning speed on a reopened tab). Other browsers don't do anything like that, so when a tab is reopened, they reload the content (to put it differently, when a tab is closed in Fx/Safari/Chrome, it's gone from RAM, as can be seen from the sharp drops in the graph from TFA).

    This just isn't a valid test because Opera works differently from everything else, which is why I love it; advanced caching is one of those things that make all other browsers "unusable" for an Opera user.

  • Re:It doesn't matter (Score:1, Interesting)

    by Anonymous Coward on Sunday June 21 2009, @09:11AM (#28410051)

    You have to look at it from another perspective. Before AJAX, it was impossible to have threaded discussions on web pages.

  • Re:Tabs hell (Score:3, Interesting)

    by The MAZZTer (911996) <megazztNO@SPAMgmail.com> on Sunday June 21 2009, @09:46AM (#28410235) Homepage
    IMO Chrome would likely be more lightweight and faster. We've established the benchmark author doesn't know what he's talking about [slashdot.org].
  • Re:It doesn't matter (Score:2, Interesting)

    by guppysap13 (1225926) on Sunday June 21 2009, @09:46AM (#28410237)
    These comments about Opera bother me slightly...I'm running Ubuntu with 512mb ram (495 after video card grabs some), and Opera Unite doesn't even use half of it (plus, that's when it's been left on with multiple webpages open overnight when I fell asleep at the computer). Do the browsers scale their usage based on the amount of available ram on the system?
  • Re:Finally... (Score:3, Interesting)

    by Spatial (1235392) on Sunday June 21 2009, @10:22AM (#28410487)
    It comes on pretty much every new netbook.
  • Re:It doesn't matter (Score:3, Interesting)

    by Blakey Rat (99501) on Sunday June 21 2009, @11:51AM (#28411163)

    I wrote a blog entry just yesterday about Slashdot's completely ignorance of the term "staging server": http://blakeyrat.com/index.php/2009/06/slashfail/ [blakeyrat.com]

  • Re:Moving targets (Score:3, Interesting)

    by AmiMoJo (196126) <mojo@ w o rld3.net> on Sunday June 21 2009, @12:01PM (#28411215) Homepage

    Memory usage is important, but absolute numbers are not. Scalability is the key.

    If a browser can run fine on a phone with very limited memory and processor speed, but then scale up nicely to my desktop machine which has 6GB RAM than to me that seems like the best option.

    BTW, my desktop machine really does have 6GB RAM, and my laptop 2GB. 2GB of DDR2 RAM is less than £20 now, so I'd rather have a browser that can make good use of it and speed up navigation and rendering than have one which leaves 80% of the machines resources unused. I spend at least 50% of my time at the computer in my browser, probably more. Of course it needs to back off when I want to run other apps too, but the OS should be able to work with the app to make that happen.

  • Re:Finally... (Score:2, Interesting)

    by darpo (5213) on Sunday June 21 2009, @02:00PM (#28412115)
    Someone really needs to put up a website, say, firefoxmemoryhog.com, and having people submit *exact* details from their machines when this happens. Which extensions are being used, which OS the person has, which version of FF. You hear these anecdotal reports about insane FF memory usage, but they're useless without hard config data. It's gotta be particular add-ons and plug-ins causing the problem. Just need to identify which ones, and shame them into fixing their issues.

Space is to place as eternity is to time. -- Joseph Joubert

Working...