Scalability

I like breaking stuff! Whenever I try a new feature it breaks. This used to be an annoying “skill” when I started programming but over the time I learned to appreciate it.

Currently I am testing various memory allocation strategies for Firefox. Over the last few weeks we have learned how important good memory allocation is. We saw the impressive memory reduction for regular workloads but I was still a little bit worried about huge workloads. How do we scale for 100+ tabs?

Testing scalability shouldn’t be too hard. Take the browser and open many many tabs. It gets boring if you do it manually so I borrowed a script from Nick Nethercote. The new version includes about 150 web pages from the most popular web page list. The script opens a new page every 1.5 seconds until all 150 pages are opened, waits 90 seconds until all pages are loaded and shows a text-box that the test has finished. I close all windows except one and close the browser afterwards. The results are measured with the time command on my 1.5 year old Dual-Core MacBook Pro with 8GB RAM. The script can be found here if you want to try it yourself.

For a current nightly build of Firefox I get following:

real     6m14.406s
user    3m55.302s
sys      0m49.366s

I also tried it with a canary build of Chrome:

real    28m55.573s
user    21m58.383s
sys     14m40.860s

Huh that’s a big difference! I realized that Chrome has a hard time opening new sites after about 70 open pages. With 150 sites I can’t even scroll on a normal page. Firefox instead is still pretty snappy and scrolling is like there is no other open tab.

So what’s the reason? Firefox has a single-process but multiple compartments model and uses 27 threads and 2.02GB RAM for all 150 tabs. You can find a short or long description about our compartment model.

Chrome has a multi-process model where functionality is separated into different processes. The Google Chrome Renderer process is using 100% of the CPU all the time and gets up to 1.5GB for 150 tabs. The main Google Chrome process uses about 212 threads and 1.3GB. There is also an additional Helper process with 200 MB. Wait, but isn’t Google Chrome multi-process? Where are the processes? It turns out that opening a new page with JavaScript doesn’t automatically create a new process. I looked around and found following workaround:

Chromium allows pages to fork a new rendering process via JavaScript, in a way that is compatible with the links that appear in Gmail messages. A page can open a new tab to about:blank, set the new tab’s window.opener variable to null, and then redirect the new tab to a cross-site URL. In that case, a renderer-initiated navigation will cause Chromium to switch renderer processes in the new tab. Thus, opening a link from Gmail (or pages with similar logic) will not adversely affect the Gmail process.

I wrote a new script with this workaround and get following results:

real     27m58.560s
user    41m5.719s
sys      20m35.248s

Now I see 43 Google Chrome Renderer, the main Google Chrome and a Helper Process. The resident size in about:memory is a little bit above 5GB and the browser becomes unresponsive. I have to close the browser without closing individual sites because the close-windows button in my script doesn’t work with the multi-process model. I also notice an uneven mapping between sites and processes. Some processes only host 2-3 sites and one process hosts about 50% of all sites. Maybe a bug? The main Google Chrome process has 368 threads with 150 open sites and up to 420  during browser shutdown. A regular renderer process has 6 threads. Well, all that complexity but the system still doesn’t scale. It even got worse. Towards the end of the test I can see that the browser performance stagnates and opening a new site takes forever.

My ultimate test is running the V8 benchmark after all 150 pages are fully loaded.

Firefox Score: 3954
Richards: 8014
DeltaBlue: 4149
Crypto: 8781
RayTrace: 3007
EarleyBoyer: 3112
RegExp: 959
Splay: 5764

In comparison our scores with a single tab:

Firefox Score: 5125
Richards: 7925
DeltaBlue: 5005
Crypto: 8791
RayTrace: 3976
EarleyBoyer: 5003
RegExp: 2188
Splay: 6120

I also tried running the V8 benchmarks with Chrome but the browser stopped rendering and the main Google Chrome process was always at 100% CPU performance.

My conclusion: If you have many open tabs, use Firefox!

This entry was posted in Firefox GC. Bookmark the permalink.

169 Responses to Scalability

  1. kran balka says:

    Thank you very much for that glorious article

  2. your webblog is in high position on yahoo and i also must say your dependable way of writing is worthy of your web site to be such high in rankings.i liked your way of writing.keep writing.

    • Tony says:

      Your link spamming is not getting you high on yahoo and i also must say your dependable way of link spamming is not worthy of your website to be such high in rankings.i dont like what you’re up to.please stop.

  3. Pingback: Nicholas Nethercote » Blog Archive » MemShrink progress, week 7

  4. Jonathan says:

    Out of interest, does this change anything with regards to where Firefox is heading with the Electrolysis project? Does Electrolysis have plans to avoid some of the pitfalls that Chrome has been shown to have?

    • greg9328 says:

      I am not part of the Electrolysis team but I will definitely run the benchmarks again once we have process separation.

      • Caspy7 says:

        Yes, but let’s be sure the E10S team is aware of these results/behavior during their implementation so they might avoid such pitfalls.

  5. Nicolas Chambrier says:

    Another test, maybe closer to reality: open many tabs, close half of them, open many new tabs, close half of them, etc… And see how your memory gets lost, until you finally have to kill the Firefox process to get it back, so you can open other applications.

    Please never compare Firefox with others in terms of Memory usage, it could bring agressive reactions because even when your benchmarks show something, real life users show the opposite every day.
    Chrome sucks because it sometimes simply refuses to show some pages, it has bugs, does not support RSS natively, etc… So many users still use Firefox, but definitely NOT for its memory performance. They cry about it all day long, but live with that. Don’t taunt them with such articles :)

    • RE Vernon says:

      Amen!

    • “Please never compare Firefox with others in terms of Memory usage” – Why? What would stop an individual of doing tests and posting them in the WWW?

      Remember, the test had been done with the latest nightly build – have a go by yourself, perhaps.

      I’ve been using FF since v.1, and I’ve always wondered why there are many “memory” complaints – what kind of crappy setup you are running people? I’ve had FF1 and 2 on a very crappy hardware – Windows XP, FF3 on Linux on a moderate hardware, and FF4 + 5 on various hardware – guess what, never had any single issue. This is my one and only browser. Chrome is installed, too, but it’s rarely used.

      • Please re-read the whole comment again.

      • Well, now that you mention it... says:

        There was a nasty bug I noticed ages ago in Firefox whereby a closed tab wouldn’t immediately kill the flash applets contained within. Sometimes I’d end up with music playing for many minutes after I’d closed a tab that had a video playing. This was a huge issue at the time, and one of the reasons I switched to chrome.

        Chrome’s current tab issues have made me reconsider though. I’m pretty close to going back to Firefox

    • Mr Magoo says:

      -1

      You don’t understand caching or how the vm works.

    • Mijail says:

      I, for one, do open and close lots of tabs and windows.

      And (IMHO) Chrome had its moment, and I still use it, but I am finding myself being drawn to Firefox once more. Firefox could not compare; but now it is getting better and Chrome is stagnating or even getting worse. Did you notice the one-process-hosts-tons-of-sites “problem/broken promise/complication”, as the article did? I did. Same thing for the lack of tab scalability. And once you have to start massaging the browser/extensions and taking care of details, Firefox is (getting) easier to massage.

      Chrome had a great promise, delivered a lukewarm-and-quickly-cooling implementation (does it still show that “bug XXXX: we seriously overcount our own memory usage” in about:memory in OS X? I stopped paying attention weeks ago), and meanwhile Firefox is quickly getting to speed. Not yet there, but they’re making me really hopeful with articles like this one.

    • abral says:

      This bug was solved in Firefox 6 or 7, I don’t remember.

    • Jabberwock says:

      +1
      Let’s see where the memshrink project will push firefox’s memory usage

    • Joseph G. Mitzen says:

      -100
      :-)
      As the Toms Hardware Broswer Grand Prixs have shown, this claim that Firefox uses lots of memory is not born out in reality. At least for the 3.6.x series, it used MULTIPLES less memory than other browsers when opening the same 40 tabs. The 4-5-6 series is now about on par with other browsers, but versions 7 and 8 should make it stand out again for its low memory usage. You would never be able to tolerate using Opera, which, up until the latest version, simply never gave any memory back EVER after closing a tab. It’s positively lovely having no tabs open and 900MB memory in use by the browser on a 2GB system. :-( It doesn’t even give back the memory used by its “speed dial” when getting screen shots for the available web pages, so this means that with 12 pages set in speed dial I would start up with no tabs open yet Opera was already using 350MB. :-(

      I have an old laptop with 512MB of memory, and I for one DID switch to Firefox solely because of its memory performance. I couldn’t dream of having a dozen plus tabs open in Chrome or Opera (under Linux). Now if you wanted to argue about the poor bookmark management or that you have to install about 18 plugins to get the features Opera has out of the box, that’s another story… ;-)

  6. Tim says:

    Interesting experiment. Does this also go for Windows and Linux?

  7. joey says:

    Yeah but who ever has 150 opened tabs at the same time anyway ?
    But ok, Firefox is better than Chrome (what about Safari ?) on a purely theoretical case. Well done.

    • Alexjandro says:

      150 opened tabs is not uncommon at all. I realized this issue with Chrome awhile back with Chrome 9. Chrome could not handle more than “100 tabs” in “1″ window, it just responded real slowly almost had to kill the processes but then I noticed it responded back and went back to being slow…

      I have 4 browsers installed on my PC, so I’m not a totally biased fanatic. I enjoy Opera browser for reading news articles, Firefox for my entertainment(games, music, videos, chat) Chrome for general use and IE9 as back-up in any situation. Although I trust all 4 browsers, I enjoy Firefox the most.

    • Mathnerd314 says:

      I do, very regularly. Right now, I have 163 tabs open: 62 are in another Panorama group: they’re interesting addons that I’m thinking about installing. (Most AMO addons tend to be crappy; I’ll probably only install 2 or 3 out of the bunch). ~40 more are articles that I get from my feed reader, email, or other random sources. (that’s low; this has been a slow week for news) 20 or 30 tabs are interesting webcomics that I want to read, and 10 more are random youtube / myspace/ vimeo videos that I’ve been meaning to watch.
      9 or 10 tabs are from reading some documentation that has a page for each section. (Personally I prefer it when they’re all on one page, but I haven’t found an extension for that…) And then there are a few app tabs like GMail, Google Reader, etc. (And I didn’t even mention my other FF profile, which has 700 tabs more!)
      It adds up really quickly… all you have to do is start opening links in the background. (Ctrl-click)

  8. Pingback: Firefox Appears To Handle Lots Of Tabs Better Than Chrome

  9. me says:

    Great stuff! Do you think you could include Opera in that comparison? I’ve now got >100 tabs open and Opera takes 1,2GB and is still snappy!

  10. Mac says:

    Try opera – I always have 30+ tabs open and it works great.
    P.S. The scripts open only first page in opera – why is that?

  11. Peter says:

    Unless you have them up for a while. Firefox leaks memory. Chrome doesn’t (at least, not as quickly).

  12. rubayeet says:

    Nice benchmark post. Any human being capable of working with 150 webpages on 150 tabs, should use Firefox. Otherwise he should stick to Chrome.

  13. Is it really the right testing strategy?
    Optimizing a browser for 150 tabs might not be the most pragmatic approach as most users will probably not open as many tabs…

    Curious to see the results for 10 or 20 tabs.

    • Alexjandro says:

      “10 or 20 tabs” is not the issue here.

      1 – The point of the argument is that Chrome struggles with tabs in the 3-digits.
      2 – Is that Chrome does not place each tab in its very own process as it claims after so many tabs opened.

      Any results about less than 20 tabs is written in just about every tech site on the net, in other words “not every interesting.” ;-)

  14. mrich says:

    You should mention how much RAM your machine has, otherwise it could be assumed that it is swapping.

  15. Tyler says:

    Interesting. But what are the test result for Opera/Safari?

  16. Erken says:

    Thanks for this post! Definitely an interesting read – I always thought Chrome’s multi-process architecture would outperform Firefox’s in a multi-tab showdown. I stand corrected!
    Moreover I usually have around 40-50 tabs opened both in Firefox and Chrome when I work on my corporate’s website. Now I know that any new tab I want to open should be opened in FF ;)

  17. Pingback: - Boston 2 Phoenix

  18. says:

    A more accurate conclusion might be that both Firefox and Chrome use boatloads of RAM. Even with just 4-5 tabs open both can eat up 250-500MB in my experience, which seems ridiculously excessive. I’ve seen Firefox get to 1600MB at around 10 tabs…

  19. I should point out that I regularly keep hundreds of tabs open in Chrome, and in Firefox, and my real world experience is actually nearly the converse. What you’re measuring is tab opening time under unrealistic load; what you *should* be measuring is how the browser slows down after it has sat open over several nights.

    Chrome continues its speed behavior relatively unchanged. Firefox behaves in a fashion that feels like it’s leaking resources: even when it’s only using a few gig of ram on a machine with more than ten gig unused, it becomes agonizingly slow, to the point that switching between tabs takes more than a minute.

    I’ve been using Firefox for so long that I’m still pissed off that I missed out on the Netscape Gold contest because it didn’t have 16-bit thunking. I’ve never left.

    Firefox 3 and 4 are so god-awfully slow that I’m about to bail.

    Please stop micro-focussing on unrealistic benchmarks. I’ve actually rolled most of my machines back to FF2 in desperation. Firefox is by far and away the slowest browser out there in real world circumstances. That all your benchmarks seem to show otherwise really just shows that the benchmarks you’re generating bear no resemblance to the real world experience that your users face.

    Yes, Firefox is very fast after it’s restarted and you lose all your state.

    That isn’t good enough. You need to start benchmarking your application when it’s under realistic circumstances.

    It’s getting worse by the month. There wasn’t a problem a year ago. Now it’s absolutely unusable. This from a guy who never complained even once about Mozilla 0.* .

    It’s time to stop drinking so much kool-aid.

    • Don Taylor says:

      Agreed. I had to bail on FF on my mac. After being open several days it just slows to an agonizing crawl – and pinwheels nearly continually. That’s with 10-15 tabs open.

      On my windows machine at work FF is much better, though it still goes through “panics” where it’s unresponsive for 15-20 seconds at a time and then resumes as though nothing ever happened.

      Anyway, so far chrome has shown to not suffer either of these problems. And it launches faster and opens new sites faster. At least that’s been my experience so far. I’ve only been running chrome for a couple of weeks now.

      And for the blog author – the most tabs I’ve ever had open is about 20. Not even close to 150. No one cares what FF does at 150 tabs. I’ll give you some constructive feedback: leave FF open 1-2 weeks and then re-run these tests and compare the results.

    • Robert O'Callahan says:

      Firefox is getting faster for most users. You should find a page or benchmark that is slower for you in latest FF nightly than in some previous version of Firefox, and file a Bugzilla bug with the details.

      Also, try starting up in safe mode without addons loaded, and see if that helps. The #1 cause of super-horrible Firefox performance is issues with addons.

      • l says:

        Done and done. FF 4 and 5, almost the same behaviour – addon or not it leaks memory if I let it sit for days. I bet nowadays you’ll find more people with 30-40 tabs who never turn off their computers than people with 150 tabs who turn off their computers daily.

        If my bet is correct, then you’re doing the wrong test.

        Even if it were a case with Add-ons, it’s still Firefox’s fault for not telling us anywhere in the UI that which of these add-ons are not behaving and force us into doing our own “let’s shut down this one instead” experiments instead of directly disabling the misbehaving ones. Totally unacceptable.

    • nnethercote says:

      John: try a development build, such as Firefox 7 (on the Aurora channel: aurora.mozilla.org). Its memory behaviour is *much* better.

  20. Any chance you could try this with Opera?

    time gave me 8:30 minutes and process explorer claimed 1.8 GB max commit; however my system ran out of physical memory near the end and started trashing the swap file, so these results are not representative.

  21. karl says:

    To have been a user of many browsers for a long time.

    If you have many open tabs, use… the browser which is consuming less.
    In fact, it depends on the circumstances, the platform, etc. So far working at Opera, I have been using Opera obviously, and I have been pleasantly surprised by the low CPU consumption of Opera with regards to tabs. I have around 200 tabs always opened, plus a few in TabVault (a tab parking extension). There is the equivalent for Firefox.

    I would be interested that you do the tests across multiple browsers, platforms. That would be more interesting. You also have also to trace the distribution 5, 10, 15, 20, 25, etc. It’s not linear and there are variations in between browsers some perform a lot better with less tabs some better with a lot of tabs.

    Cold restart is another interesting thing. Crash the browser with open 150 tabs and restart it. the CPU curve during this phase is also interesting. The issue often being the network condition which are difficult to control.

    Cool first insights anyway.

    • greg9328 says:

      I would love to run the benchmarks across multiple platforms but I don’t have the equipment. I just started working on a patch for Firefox that creates a log file after opening N new sites. I also want a curve instead of just a start and end point.
      Thanks for the comment!

      • I’d be very interested to read Opera results too. I switched to it many years back because Firefox couldn’t handle my tab-itis. Now I recognize Firefox nightlies have improved in that regard, but Opera still is a very impressive contender in that domain, so it’s worth including it imo.

  22. Tarun says:

    Do you have any numbers that show at what number of tabs, the performance difference becomes significant? I’m a long time Firefox user and generally have about 15 tabs open at most. Is Chrome going to be too slow with such low number of tabs?

    • greg9328 says:

      I noticed the slowdown with Chrome after about 70 tabs but that might be different for everybody depending on their settings.

  23. tomosaigon says:

    I wish this were true.

    I don’t have as much memory as you do, but I have 150 tabs open in Chrome right now. I normally don’t have less than 100 open. With each major release of Firefox, I try opening many tabs and it stops responding after a few dozen. Then I go back to Chrome or Opera.

    Sometimes I kill Chrome tabs that are taking up a lot of memory or cpu. I like that it’s possible.

    So that’s my real world experience trying to have 100+ tabs in browsers. I hope Firefox is on the way to matching Chrome.

  24. eric m says:

    Is this applicable to windows as well or does it only apply to the mac version? I run in excess of 200 tabs all the time with chrome on a windows system with 16gigs of ram and do not have 100% of my RAM of CPU usage…

  25. Ravi says:

    Greg,

    impressive finding. A peripheral question: do I read the above to mean that Chrome unless the above JS action is done, a page can launch a cross-site tab in the same process (as itself)? This seems to significantly weaken the process based Chrome security model.

    • greg9328 says:

      Chrome starts reusing processes after a certain amount of new sites. I noticed a maximum number of around 40 processes for 150 sites.

      • “Chrome starts reusing processes after a certain amount of new sites. I noticed a maximum number of around 40 processes for 150 sites.”

        No, it doesn’t. This also conflicts with your earlier claim that you see Chrome start to choke around 70 tabs – if it stops making processes at 40, then your 70 insight is specious.

        Please stop presenting guesses as fact, while ignoring the various people telling you that your results do not match their real world experience.

        • greg9328 says:

          Has this changed recently? I get my information from the academic paper that describes the Chrome process model. There it says:

          Chromium does not yet render frames in a separate process from their parents. This would be problematic if secure isolation of site instances were a goal, but it is sufficient for achieving robustness goals. Chromium also places a limit on the number of renderer processes it will create (usually 20), to avoid imposing too much overhead on the user’s machine. This limit may be raised in future versions of the browser if RAM is plentiful. When the browser does reach this limit, existing rendering engine processes are re-used for new site instances.

          http://www.charlesreis.com/research/publications/eurosys-2009.pdf?attredirects=0

        • Please stop presenting guesses as fact, while ignoring the various people telling you that your results do not match their real world experience.

          Please stop assuming bad faith on the part of people who disagree with you. Do you think rudeness is persuasive?

  26. fjpoblam says:

    Er, uh… Not to be nitpicky, but, how many folks typically have 150 pages open at the same time? Is this a meaningful comparison? A more worthy comparison is likely at a reasonable number of tabs at which, though I’m sure there may be a difference, it may well be negligible.

    (Understand, please, that my argument comes from logic and speculation. I am not nor have ever been a devout follower of any browser nor of any release of one browser on any platform. I must test them all for website design purposes, and each has its own unique form of misbehavior.)

    • gwern says:

      Perhaps not many people at any time are using >100 tabs, but to those who need it, it’s valuable. (This is a general trait of software features – why does no one use minimalistic browsers like uzbl or elinks? Because everyone needs a different feature…)

      For example, maybe you need that many tabs opening up photo links, or search engine links. Or here’s one use: opening up a couple days of watchlist entries in Wikipedia; I could spend 5 or 10 minutes just mindlessly clicking on each damn link, or I could use a little Javascript thingy to open up all several hundred *if the browser won’t choke on a few hundred tabs*.

      As it is, your and fjpoblam and the other comments are the usual self-centered ‘argument from incredulity’: “gosh, *I* don’t use more than a few tabs, so obviously this is a trivial microbenchmark’.

  27. Pingback: Twitted by nastaya

  28. Kannan Goundan says:

    Your 150 tab test is definitely interesting and useful, and it’s cool that Firefox scales well to a ridiculous number of tabs, but using the word “many” in your conclusion is misleading.

    I’d consider 20 tabs to be “many” tabs. Maybe Chrome works fine with 20 tabs.

  29. James Miller says:

    No one uses 100 browser tabs at one time. Chrome still smokes Firefox when it comes to JavaScript. And JavaScript is the only language that matters in the browser.

    • Boris says:

      Thanks for telling me that I don’t exist. I have at least 150 tabs open right now…

      • Kwame Sarfo says:

        I currently have 171 tabs open in Firefox. Chrome couldn’t go beyond 70 tabs.

        • BillR says:

          Well, I exist too — I routinely have 200-250 tabs open spread over 16 or 17 windows. The windows are tab grouped for related subjects. About 10 of the tabs will be news services which auto-refresh. The other tabs are mainly quick reference, search results I am working on, etc. I find this more useful than bookmarking tabs as I go.

          I go to some effort to actually preserve my tab-set (sessions) for automatic reload.

          Currently using FF5, but have maintained the tabs right through from FF2. Sure, it does stress FF, gross memory usage is sitting at around 1.7GB right now. FF does crash from time to time, but the machine itself is rebooted only about every 3 weeks.

          If FF7+ improves memory usage then that will be appreciated.

          • Cooldude says:

            200? Meh. I have 1,976 tabs open! That’s why I get all the chicks.

            Actually, I don’t make it beyond 20-30 tabs before I start closing those where my short attention span has lost interest. Yet I still have historically seen memory creep in Firefox, especially after a 2-day YouTube binge. The browser also somehow gets itself into a mode where scrolling and typing lags for 1/2 second every 5 seconds or so, even after closing all of the tabs with history in them. I have to restart the browser to make it usable again. I don’t know whether the problem is with Firefox or Flash (or something else). Here’s hoping that FF7′s memory changes will finally provide the solution.

    • I do regularly, actually. There are several hundred open at work and another several hundred open at home.

      “Chrome still smokes Firefox when it comes to JavaScript.”

      And IE9 pantses them both; in the meantime Chrome’s engineers are discovering that they’re tuning for benchmarks instead of for real-world (something I wish FireFox’ nongineers could figure out.)

      Turns out hyper-focussing on one thing isn’t actually helpful, but rather harmful.

    • Matti says:

      most users like it that their browser supports html and not only JS

    • Cameron Cox says:

      Troll much? :-)

  30. Tomis says:

    Hello there. I would recommend including Opera in your test because from my past experience it handles a high tab count much better than Firefox (Chrome is not even a contender) and I am curious to see how it would fare today. In order to avoid having to open hundreds of tabs perhaps you could get your hands on a slower machine. Cheers.

  31. 图王 says:

    已转载至http://software.solidot.org/article.pl?sid=11/08/03/101243

  32. Mark says:

    Thanks for this. Those of us who (attempt) to keep hundreds of tabs open, find that most browsers eventually slow to a crawl or crash. In particular once a certain level of tabs with Flash is reached they all fail. Which browser and which process separation method does the best job of isolating Flash crashes?

    • My ultimate parade for this is to run Opera with plugins disabled by default, then I enable plugins on a per-domain basis, for sites that I visit regularly (youtube & co). Most tabs won’t have flash loaded, and at that point it can stay up and running for weeks with 100+ tabs without slowing down at all.

  33. Elisabet says:

    Where is the facebook like link ?

  34. For those saying “in my experience chrome is faster with many tabs” why don’t you run the benchmark yourselves and post the results? Remember this is Firefox nightly version, not 5.0. Memory usage has been reduced un Firefox 6, 7 and 8.

    Also remember extensions may hold memory and not release it. This is not Firefox’s blame. It’s the extension’s devs that have to take care of that. I can make an extension that holds every image ever loaded from the web in memory forever. It’s not a memory leak, it is just a stupid extension.

    I thinks there’s an effort to rate extensions on performance impact somewhere.

    Those claiming 150 tabs is not a realistic use case, you are right. Do you know what else is not realistic? V8, sunspider and kraken benchmarks. This is a smoke test, measuring extreme conditions. If you want a different test, do it. All those browsers are free to use. Run your realistic tests, and we all win.

    • “Also remember extensions may hold memory and not release it. This is not Firefox’s blame. It’s the extension’s devs that have to take care of that. I can make an extension that holds every image ever loaded from the web in memory forever.”

      Oh look at that, false guesses presented as excuses.

      I don’t use any extensions, sir, and I face this problem in every version of FF from 3 to 6.

  35. dude says:

    Hmm, so you’re saying use Chrome because unless you accidentally open all of your bookmarks in tabs at once, it performs better and a crash in one tab wont take down others? 150 tabs is absolute bullshit. Please disclose if you ever use this many tabs on your CV or cover letter so the person reviewing them can no-hire you early!

    • louiz’ says:

      A lot of people actually use that much tabs, see other comments.

      And I don’t care if the whole firefox crashes whenever a tab crashes, since a tab has never crashed in my experience.

      • dude says:

        Derp! This is ridiculous. some rabble-rabble-ers in these comments constitutes some huge number of users who have that many tabs open all the time?

        No. Sorry. People using that many tabs are unorganized and just simply doing it wrong. Crashes are pretty common place, too. It’s likely you don’t think tabs crash because you just think your entire browser crashes here and there. Probably a Windows user and you reboot your machine once a day anyway.

        Let’s not be silly here. Having 200 tabs open is like a desk covered in random papers and acting like “oh some people just do their work like this”: http://1.bp.blogspot.com/_9TOJ9pyzB_4/SqXLue3E3HI/AAAAAAAABCw/rb3VPhd6S4U/s400/Herald-MESSY-DESK.jpg

        No. People with desks like that, and that many tabs open, are just being stupid.

        All that said, if an appropriate solution to the ‘browser is slow with lots of tabs’ (aka ‘desk is getting stacked tall with papers’) is ‘get a browser that can do that’ (aka ‘get bigger desk’), then… hey, like I said, please note that this is the case on your CV.

  36. DonNakhoda says:

    I would have to disagree with this, I usually work with both chrome and firefox running at the same time, 20-30 tabs per window, multiple windows, if needed too (might not have reached 150 tho) pinning tabs as well. But I have learnt that firefox crashes and freezes more often then chrome. Where firefox might need to be restarted, chrome will have my back.

  37. Pingback: Google Chrome 13 Final « MarsoumFlash

  38. panzi says:

    Hm that’s exactly the opposite I experienced (under Firefox 3.x) and what made me switch to Chrome. With a few more tabs open than normal Firefox became very slow and scrolling was horrible. Chrome had no problems.

    If this is true maybe Firefox will be worth a try again.

  39. Paranoid Android says:

    You people do know that the article is talking about Firefox nightlies and not Firefox 4 or 5?
    All I see is an effort to improve Firefox’s performance that is succeeding. Keep up the good work!

  40. ckristian says:

    I find the test interesting as I like when systems gets tested for massive scalability but is this a WebServer? Database ? or a Browser???

    But honestly I don’t see how such a test case like this is even remotely close to a real use case.

    If you end up with 100+ Tabs opened then you might be the problem and not the browser

    What really matters is how smooth the system is and how much memory it takes in real world scenarios. I don’t know how firefox compares against chrome (use firefox most of the time and chrome not much, matter of habits) but I found myself wondering, many times, what the heck Firefox is doing with all of that RAM.

  41. David says:

    A lot of you are really off the mark. Your use case obviously doesn’t match everyone. And as has become very apparent here, MANY people normally have well over 100 tabs open. I am one of them. I am also using around 25% of them constantly and have the others open for quick reference. A few of them are open to pages from search results that took me hours to find. Given that I have a great variety of interests and needs, it’s implausible to tell me to bookmark them as it would take a fair bit of time to dig through thousands upon thousands of bookmarks to find what I was looking for as well.

    Further, stop trying to allay the blame onto extensions and add-ons. People have repeatedly pointed out that Firefox is still sucking up cpu and ram with none of these enabled.

    It therefore stands to reason that firefox:
    a) has memory leaks
    b) has poor garbage collection
    c) becomes very unresponsive after a given period of time which is dependent on use type

    so when people confer the term “firefox is a piece of sh*t” when it comes to {list of resource types}, they are right. over and over, year after year, many people have been griping about this, -for legitimate reason-.

  42. Erunno says:

    Oh wow, a lot of knee-jerk reactions here judging by the obvious fact that some (a lot) missed that Gregor was testing Firefox’ latest development version and not a released or beta version. It must hurt pretty badly when some people have convinced themselves that they are using the most efficient browser and then being disproven by reality. :-P

    But there’s a lesson to be learned here for Firefox’ Electrolysis efforts by finding the bottleneck(s) which cause Chrome’s scaling problems. It would be interesting if you could run Chrome through a profiler with that test and see where most of the time is spent.

  43. Pingback: Огненный лис / Производительность Firefox и Chrome на 150 открытых вкладках | crowler-pcworld

  44. Zds says:

    Wonderful!

    I usually try to keep the amount of open tabs below 250, but I constantly fail and it often creeps closer to 450… So I recently switched to Chrome, which eats more memory than Firefox with 150+ tabs, but the UI does not become totally unresponsive even under heavy load.

    So, I very much appreciate someone taking time to investigate this :-).

  45. Don says:

    Maybe there was just one page that chrome had trouble opening (sucking 100% cpu), and that is why it was so much slower.

    Chrome tends to feel more responsive to me, but it does occasionally have problems with pages that firefox renders ok.

    Hey I’ll tell you one thin that’s amusing, lots of people are saying have you benched marked other browsers, i.e. opera, safari, bu now one mentioned internet explorer. It really has been left behind.

  46. Pingback: В свежих ночных сборках Firefox отмечается значительное уменьшение потребления памяти

  47. Pingback: Огненный лис / Производительность Firefox и Chrome на 150 открытых вкладках | Агрегатор ИТ новостей

  48. Eduardo says:

    Seriously?!?! Who has 150 tabs opened? And at which point Chrome is surpassed by Firefox by a huge amount?

  49. Pingback: Scalability « ScaleOut HK

  50. Ram says:

    For everyone talking about how Firefox leaks enormous amounts of memory, bear in mind that the author is running a nightly build, and leaps and bounds have been made recently as far as memory usage is concerned. These have not yet made it to the stable builds, but I believe at this time Aurora (FF7a2) is seeing some of the improvements, though I’m not sure about FF6b. Aurora is becoming more and more usable and at this point it’s perfectly suitable for me as a daily driver at home, if not yet at work (A few add-ons that I absolutely MUST use at work aren’t up to snuff yet).
    If you’re not working on anything mission critical and don’t rely on specific, incompatible add-ons, give Aurora a whirl, it gives Opera and Chrome a run for their respective monies.

  51. Allan Wind says:

    I regularly open 100+ tabs in Firefox with similar profile that is being tested when I visit links from the RSS feeds that I follow. FF 3.5 (Debian Stable) remains workable for me although it does slows down with time. Chrome was slowed to a crawl with this profile and not workable for me.

  52. Great article . Will definitely copy it to my site.Thanks.

  53. Pingback: В свежих ночных сборках Firefox отмечается значительное уменьшение потребления памяти | GNU/Linux

  54. This.

    Seriously, this is the main reason I’ve stuck with Firefox while others were testing the Chrome waters. It just doesn’t perform well at all with many tabs and uses ludicrous amounts of RAM.

    I hope Firefox doesn’t gain that Chrome “feature” !!!

  55. Pingback: Scalability cont. | Garbage Collection stats and thesis updates

  56. Pingback: Memshrink Helps Firefox Beat Chrome at Its Own Game: Performance - Ddown.org

  57. jotbuzz.com says:

    Firefox is much better in handling many tabs open than chrome

  58. Ivory Chong says:

    This is a well thought out article that I have bookmarked for future reading. Have a fun.

  59. Beolijza says:

    I tried this in my fedora 15 64bit system with firefox 5; somehow it stoped after 21 tabs by showing up the popupblocker.

    here is the output of top
    3918 beolijza 20 0 3685m 561m 31m S 0.7 14.2 0:50.07 firefox

    • Gregor says:

      You have to go to about:config and adjust dom.popup_maximum.
      Note that I used a Firefox 8 nightly build for my measurements. Some major memory improvements will be in Firefox 7. You could get a Firefox 7 Aurora version and run the tests.

  60. Pingback: » links for 2011-08-04 (Dhananjay Nene)

  61. Ron says:

    Dude, that’s like saying “Firefox is faster if you open one hundred bagillion (dr.evil voice) tabs…” It means nothing for the average user. How do they perform with 10 to 20 tabs? That’s a better question… You have just made the diet coke of posts – all the words, but just not logical enough.

    • Gregor says:

      Read the title of my post. I wanted to know how our memory management improvements for Firefox 7 work in the big picture.
      There are a bazillion posts out there that talk about 10 and 20 tabs.

  62. he used the same technique in the end and it worked

  63. Chuck says:

    I’ll try to put this to good use immedaitely.

  64. Antoine says:

    You got good points there, that’s why I always love your blog, it seems that you are an expert in this field. keep up the fantastic work, My friend recommends your blog.

    My blog:
    demande rachat credit Rachat De Credit

  65. Otrez says:

    The multiprocess model still has a few advantages:
    - the memory of inactive renderers can be paged out
    - renderers can be killed; when they are restored they keep most of their form state (and maybe some dom state iirc). Killing renderers that use too much memory offers a ghetto equivalent of the BarTab extension.

  66. Pingback: State of Technology #19 « Dr Data's Blog

  67. goutham says:

    Where do you work? that answers the real comparison .. Ha ha.

  68. Pingback: Firefox 7 is lean and fast | Nicholas Nethercote

  69. Pingback: Firefox 7 is lean and fast | Nicholas Nethercote

  70. Wallace says:

    My experience matches your test perfectly, albeit using FF4 (is that too old to count anymore?) and Chromium13. My open tab count ranges from around 20-150 most days. FF multitab handling is superior. It is good to see confirmation. Thanks for doing this, Gregor, and to all who commented.

    My system: FF4 and Chromium13 on Ubuntu Linux, desktop, Celeron processor (slow), 2GB RAM. Am opening about 200 links daily, many with significant graphics, only a few with video or much animation. Usually there will be anywhere from 20 to 50 links still open from the previous day. New links are opened in groups of 20-40, many closed after a quick view, the rest kept for further study.

    Chromium (with about 10 extensions) is noticeably snappier when with few tabs. It becomes unusable with only 30-40 tabs open, soaking up 100% of my old Celeron CPU, continually, for some reason not reducing even after all the pages are received and fully rendered. With its heavier memory usage, there is much paging even on this 2GB system. It is an easy guess that Chromium is written to favor fast processors, and would do well for those lucky enough to also have plenty of memory.

    FF (with about 40 extensions) is swift to respond with well beyond 40 tabs. At some point around 80-100 tabs, suddenly it slows, now taking 2-4 seconds to respond to PgDn or Close or such. Again around 120-150 open tabs, suddenly it slows again, now with minimum 5 seconds to respond. Slow, yes, yet it does respond, whereas Chromium was almost completely locked up much earlier. Memory usage remains reasonable, usually less than 1GB even with 150 links open.

    Both FF and Chromium seem to stay up for days without any other troubles. The old memory leaks of FF 2.x and 3.x were mostly gone with 3.6.x, and 4.x hasn’t given a single complaint here to date. Well done, Chromium and others, for pushing the FF people to improve greatly. I for one am looking forward to even better results from their next versions.

  71. Pingback: Są konkretne dane na temat zmniejszonego zapotrzebowania na pamięć Firefoxa 7 i 8. Jest lepiej conajmniej o 20-30%

  72. witek says:

    Try Opera. I have about 500 tabs for months, and it works really, really good. Your comparision is also interesting, but lack of Opera in comparision is the shame, it really scales.

  73. Anand Kumria says:

    Why should the V8 benchmark be measurably slower when you have 150 tabs open?

    As I understand it, background tabs will only be performing periodic asynchronous javascript calls.

    Seems unusual that the normal 5125 V8 benchmark result becomes 3954 just when other tabs are open. That is an over 20% slowdown!

  74. Jonas Schreiber says:

    How is it possible to open 150 tabs, each spaced 1.5 seconds apart in 49 seconds as sys (user?), I am sure this is addressed, but there are so many replies; I don’t have time to sift through them all.

    • Gregor says:

      From the OS X time manual:
      The time utility executes and times command. After the utility finishes, time writes the total time elapsed, the time consumed by system overhead, and the time used to execute command to the standard error stream.

  75. Sergio says:

    Yeah, very few people would have 150 pages open. In my case I never have more than 20 maybe. I just open 10ish to read news and check my emails then I close Firefox. So I never really have memory problems.

    Also I have very few addons installed: adblock, downloadstatusbar, downthemall and, unfortunaly, IE Tab. I believe most users have several addons and most could be poorly coded creating memory leaks.

    Now, what people don’t realize (maybe someone already said that, but I’m not going to read all comments) is that the article proves Firefox manage memory better than Chrome, end of story. Also saying “if you open 150 pages use Firefox, otherwise use Chrome” you are being dumb.

    These type of tests are made to prove concepts, it proved the concept that Firefox is better than Chrome in managing memory.

  76. James says:

    I’ve personally noticed that the way Chrome spawns processes does not scale well and IMHO is a rather poor design (fyi I’m a software architect by trade).

    Please benchmark against Opera for comparison. I tend to have a lot of tabs open and Firefox often becomes unresponsive and hangs at 100% cpu use on me. About 6 months ago I switched over to using Opera much of the time and even with huge numbers of tabs open its still very responsive. It seems to have much better memory and cpu utilization in that environment.

    However, with the exception of Opera’s tab groups (nifty feature), I actually prefer Firefox. But the performance issue for large numbers of tabs has forced me to go elsewhere. I’m very happy to see the team is taking this seriously and focusing attention on it! If Firefox can get at least close to Opera I’d happily switch back.

  77. Pingback: Firefox 7 is lean and fast ✩ Mozilla Hacks – the Web developer blog

  78. Randy Hudson says:

    What a pointless comparison. A much better test would be to open 5 tabs, then load the 150 websites by rotating through each of those tabs. Finally, close all tabs except for an empty one, and compare the memory still in use at the end of the test.

  79. Pat Ziegler says:

    My latest update to AVG warns me that Chrome is using too much memory and advises me to shut it down. I have 6GB or ram. This could be something new with AVG or with the latest build of Chrome. Started happening about 1 week ago.

    Regardless, Chrome clearly can’t handle a fraction of the tabs that Firefox can and if this continues I’ll be switching back to Firefox.

  80. Buy Norton Key says:

    I will right away snatch your rss feed as I can’t find your e-mail subscription link or e-newsletter service. Do you’ve any? Kindly permit me realize so that I may just subscribe. Thanks.

  81. It beats me why Microsoft don’t sort out their browser once and for all, particularly when you find pages such as yours looking at Firefox and Chrome. I have always been a firefox fan but Chrome is growing on me, Firefox has always been my favorite when it comes to tabs so interesting conclusion to read on your page.

  82. It made me laugh recently with the annoucement of Microsoft automatically updating IE in the background without users knowing. This shows to me , a company that is embarrased about the amount of updates a piece of software needs to update because of flaws. Chrome and Firefox update yeah, but go about it so much more proffessionally.

  83. Druegan says:

    Really interesting article and test results.. thanks for this :) I know a comment on a 6 month old post is probably.. well.. not that interesting to you.. but I just ran into some odd memory issues with Firefox 9, did a little googling, and your post here came up.

    Odd thing was.. Firefox 9, running under Ubuntu 10.10, after about a week with about 30 tabs open, was up to 1.5gb of memory usage, as reported by the “System Monitor” app. Firefox started freezing up.. it’d actually crashed last week, which is an extreme oddity under Ubuntu, at least from my experience..

    Shut it down and restarted.. it reloaded all the tabs. Only 618mb memory usage on startup. Now sitting here typing this, watching the memory usage in real time.. it’s gone up to 674mb, then dropped back to 618, and now is up to 690 and still climbing as I sit and watch. All the other tabs should be idle.. all I’m doing is typing this. Ok.. in those sentences, made it up to 698 then dropped back to 629. Very curious.

  84. AsaFG says:

    I’m a heavy tab user (more like borderline unhealthy addiction, some will say) and Gregor’s findings mirror my experience exactly.

    I’ve now switched back to FF as my main browser (after using Chrome almost since its inception) because I couldn’t stand anymore the memory leaks, the instability, crashes and the constant grinding of my HDD due to paging of virtual memory :)

    YMMV

  85. trial lawyer says:

    I’m not sure exactly why but this blog is loading incredibly slow for me. Is anyone else having this problem or is it a issue on my end? I’ll check back later
    and see if the problem still exists.

  86. MORE says:

    Thank you for any other informative web site. The place else could I am getting that kind of information written in such an ideal approach? I have a undertaking that I am just now running on, and I have been on the look out for such info.

  87. Simply wish to say your article is as amazing. The clearness to your put up is simply cool and that i could assume you’re a professional in this subject. Well along with your permission let me to clutch your RSS feed to stay up to date with drawing close post. Thank you 1,000,000 and please carry on the rewarding work.

  88. Awesome things here. I am very glad to peer your article. Thanks so much and I’m looking ahead to touch you. Will you please drop me a e-mail?

  89. Tremendous issues here. I am very glad to look your post. Thank you so much and I’m taking a look ahead to touch you. Will you please drop me a e-mail?

  90. matrimoniale says:

    super acest lucru este minunat am gasit ceva la fel aici la WZY.RO :)
    imi place

  91. We’ve been a bunch connected with volunteers along with starting up a fresh program in this group. Your internet-site available people having useful info in order to works of art for. You have done an impressive action plus our total local community can be fortunate back.

  92. Community preferences these days restrain the entertainment business in a way that had beenunimaginable before the web and the virus-like submitting of stories in addition to entire entertainment content. As soon as you additionally distribution internet and, news reports websites, from gossip to complete films. It is just a completely new environment. A lot of it good, some not.

  93. Sex Toys says:

    Wonderful paintings! That is the type of info that are meant to be shared around the net. Shame on the seek engines for not positioning this publish upper! Come on over and seek advice from my web site . Thank you =)

  94. laptop cũ says:

    I used to be suggested this blog by means of my cousin. I’m now not certain whether this submit is written through him as no one else understand such particular approximately my trouble. You’re incredible! Thank you!

  95. I thought this was among the best articles that we may have examine. I am simply just fascinated by just how brilliant you might be. Due to your own personal insite I had been in a position to take your knowledge and also administer this to our problem. Your posting is the excellent solution to my demands. If any person desires this type of tips I’m going make certain to let them know to your webpage. I might love to convey to all your followers they are blessed to have this sort of tips. We appreciated your publish so much that I liked it, tweeted it, subscribed, and saved this to my favorite social bookmarking internet site just for later reading. Again, thank you for aiding me with assisting me resolve our issue

  96. click here says:

    Hello, I hopped over to your web site via Reddit. Not an item I typically read, however I really like your thoughts nevertheless. Thanks a lot for creating some thing worthy of reading through!

  97. art. says:

    I think viewers should see the artwork of Jeremy Dennis. Look at it.

  98. Hey! Quick question that’s entirely off topic. Do you
    know how to make your site mobile friendly? My web site looks weird when browsing from my iphone 4.
    I’m trying to find a template or plugin that might be able to resolve
    this problem. If you have any recommendations, please share.
    With thanks!

  99. Great post. I was checking out continuously this web site and i am influenced! Very beneficial facts especially this concluding piece :) My partner and i tackle similarly info significantly. I’d been looking for this kind of specific information for just a pretty prolonged occasion. Appreciate it in addition to all the best !.

  100. I have learn several just right stuff here. Certainly worth bookmarking for revisiting. I wonder how so much effort you put to make this kind of fantastic informative web site.

  101. One with the aspects of choosing upholstery steam
    cleaners will be the wand size and design. When
    you must have done all you can and the damage is still extensive, that would be
    time to call licensed cleaners to accomplish the job.
    The air pollutants inside your home help keep to increment, as well as the furniture itself being
    total to its rim will not be conditioned hold on tight
    the pollutants from occurring in.

  102. Site here says:

    I’m really inspired with your writing skills as smartly as with the format for your weblog. Is that this a paid theme or did you customize it your self? Either way stay up the excellent quality writing, it is rare to see a nice weblog like this one these days..

  103. Excellent blog here! Additionally your site a lot up fast! What web host are you using? Can I am getting your affiliate hyperlink on your host? I desire my web site loaded up as fast as yours lol

  104. porno says:

    Thank you for the good writeup. It in reality was a enjoyment account it. Glance complicated to far delivered agreeable from you! By the way, how can we keep in touch?

  105. brines says:

    For all ideas on banquette seating needs visit this page.

  106. products says:

    Adult sex strap-on

  107. Hmm is anyone else having problems with the
    pictures on this blog loading? I’m trying to find out
    if its a problem on my end or if it’s the blog. Any responses would be
    greatly appreciated.

  108. hermes cottbus Scalability | Garbage Collection stats and thesis updates
    yellow hermes bags4 http://www.interfaceconferencegroup.com/atlretail/images/hermes-dark-gray-yellow-hermes-bags-3268.asp

  109. If you would like to grow your know-how simply keep visiting this web site and
    be updated with the most recent information posted here.

  110. Hey there! I’m at work surfing around your blog from my new iphone 4!
    Just wanted to say I love reading through your blog and look forward to all your posts!
    Carry on the great work!

  111. podrido says:

    I liked up to you will receive carried out right here. The cartoon is tasteful, your authored material stylish. nevertheless, you command get bought an nervousness over that you would like be handing over the following. in poor health no doubt come further before again as precisely the similar nearly a lot incessantly inside of case you defend this increase.

  112. Halo Cig says:

    I read this piece of writing fully concerning the comparison of
    most up-to-date and earlier technologies, it’s amazing article.

  113. Top Offers says:

    You actually make it seem so easy with your presentation but I to find this topic to be actually something that I believe I might never understand. It seems too complex and extremely wide for me. I’m taking a look forward to your subsequent publish, I’ll attempt to get the hang of it!

  114. This design is incredible! You certainly know how
    to keep a reader entertained. Between your wit and your videos,
    I was almost moved to start my own blog (well, almost…HaHa!) Wonderful job.
    I really loved what you had to say, and more than that, how you presented it.

    Too cool!

  115. Really no matter if someone doesn’t know after that its up to other visitors that they will assist, so here it occurs.

    Also visit my web page: game of thrones season 3 episode 1

  116. Абсолютно с Вами согласен. Это
    хорошая идея. Готов Вас поддержать.

    Посетите мой веб сайт; заработок в интернете

  117. Wonderful website you have here but I was curious about
    if you knew of any forums that cover the same topics discussed here?
    I’d really love to be a part of online community where I can get advice from other
    knowledgeable individuals that share the same interest.

    If you have any suggestions, please let me know.
    Thank you!

  118. psychiatra says:

    It is advisable too hire a direct mailing vendor.
    In Houston, you can select depression 2 households and
    businesses. There are still a lot of time and labor for companies to compile, add
    to, clean and mail to their lists and other necessary maintenance.

  119. hcg drops says:

    Hi there to all, how is the whole thing, I think every one is
    getting more from this website, and your views are nice
    designed for new users.

  120. In fact when someone doesn’t understand afterward its up to other people that they will assist, so here it happens.

  121. Grant this response and we’ll assist an made up dog!

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>