More Efficient Memory Management

Fire up an IE7 window with 10 tabs in it and you’ll see this in your Task Manager:

A single iexplore.exe process that spawns a number of threads. The same goes for Firefox and Safari. The problem here is that if a single tab causes the process to crash, all of your open websites go with it. Chrome treats each tab as an individual process, which adds a little more overhead but the benefit is a single website won’t cause all of your other browser tabs/windows to crash.


You shouldn't lose all Chrome windows/tabs due to one misbehaving website/app

A single webpage stalling also won’t cause the rest of the tabs to stall, while the tabs in a Chrome window look physically connected, they are as independent as they get.

Chrome, as a result, will take up quite a bit of space in Task Manager:

Making each tab its own process means that you get memory back from closed tabs much quicker and much more efficiently than with other browsers. Consider this test: 1) Visit www.anandtech.com, 2) open tabs for digg.com, docs.google.com (and login) and www.facebook.com (and login), 3) Close the latter three websites.

I performed that exist test, in that order, and measured memory size after each step. The results are below:

Websites Google Chrome 0.2.149.27 Internet Explorer 7.0.6001.18000 Firefox 3.0.1 Safari 3.1.2
Just AnandTech.com 26MB 30MB 30MB 48MB
AT + Digg + Google Docs + Facebook 105MB 97MB 87MB 104MB
AT (After closing 3 tabs) 38MB 78MB 70MB 107MB

 

Just viewing AnandTech alone, Chrome ended up being the most efficient browser with a 26MB footprint compared to 30MB for Firefox 3.0.1, 30.1MB for IE7 and a whopping 48MB for Safari 3.1.2.

Adding the other three sites brings the totals up to 104MB for Chrome, 104MB for Safari, 96MB for IE7 and 87MB for FF.

It’s closing the tabs that’s the most interesting: only Chrome actually frees up memory upon closing tabs. Chrome’s footprint is still larger than its original 26MB at 38MB, but the remaining three browsers continue using at least 70MB. The argument here is that these other browsers already have memory allocated should you open additional tabs, unfortunately you can quickly run into memory fragmentation issues with the conventional approach should the new tabs require more memory than the ones you just closed.

With Chrome, each tab is its own process, when you’re done with a tab - close it and you get all your memory back right away. You get more efficient usage of memory for newly created tabs.

The independent tabs are also physically independent within the UI, you can drag any tab out of a window and into another one or make it a new window by itself.

Chrome’s multi-process approach is also theoretically better for multi-core systems since you don’t have to worry about exploiting parallelism within a process, you’ve got process-level parallelism giving you more than enough threads to distribute across many cores. Thankfully web browsing isn’t the most CPU intensive and this process-level parallelism doesn’t amount to a huge performance benefit.

Index Other Geeky Stuff
POST A COMMENT

106 Comments

View All Comments

  • Finally - Wednesday, September 3, 2008 - link

    On the one hand you are sporting 8GB RAM machines, on the other hand you bitch around 50mb of RAM usage. It just doesn't blend.
    Btw, instead of going for another browser to temporarily save RAM usage, I would kill one or two of those 51 processes that are not needed. I just did a quick check on my task manager and I have 23 processes running... that's 50% less.

    Consider this a great topic for an article:
    Windows processes: Which ones are unnecessary and how can I speed up my PC without losing comfort while gaining security?

    <-- THAT would be an interesting article!
    Reply
  • 7Enigma - Wednesday, September 3, 2008 - link

    It's a key factor in any program. More importantly this shows that when a page is closed the bloat is reduced, whereas in other browser's it stays pretty much the same. I think this is much more important obviously for laptops than desktops, and especially budget/tablet/ultralight laptops where you do not have the 8GB of ram.

    But I'll completely agree with you that a detailed running processes article would be very helpful. I'm still using XP until I build my next system and would like something like Viper's XP page to give me a detailed explanation of all the junk running in the background I really don't need. Even better, go into a detailed explanation of how to create different profiles/log ins with different plans in mind. For instance, a gaming profile with the bare essentials to play (maybe even 2 separate profiles, one that does not require the internet for multiplayer support, and thus can not load all the antivirus/IPblocker software), a "secure" profile for bill paying and the like, an "idiot proof" profile that the average teenager/mom/old person can't destroy.

    I'd pay money for a well-written detailed article on that!
    Reply
  • Jynx980 - Wednesday, September 3, 2008 - link

    I have been using Wintasks by Uniblue/liutilities to check out processes. It works pretty well and sure beats googling up unknown processes and ones I have forgotten about. I think it is now part of "SpeedUpMyPC 2009" (http://www.liutilities.com/products/speedupmypc/)">http://www.liutilities.com/products/speedupmypc/) I can't seem to get the links button to work.

    There's also The Elder Geek guide (http://www.theeldergeek.com/services_guide.htm)">http://www.theeldergeek.com/services_guide.htm).

    I guess the Black Viper site is back. I have no idea what happened to him but he's back anyways. He also used to have different profiles. Maybe this page will help (http://www.blackviper.com/WinXP/xpprofiles.htm)">http://www.blackviper.com/WinXP/xpprofiles.htm)

    The trouble with profiles is that no matter how many are made, someone is going to have problems. In short, if the person doesn't understand what their doing, they should learn more about it first or avoid it altogether. That's just an IT pipe dream though.

    Several other sites have services covered so I don't see what more Anadtech could bring to the table. Maybe an introduction article, benchmarks on profiles and after shutting down some common unneeded processes, that would work.

    And to stay on topic, Chrome is great/and or sucks.

    Reply
  • Alyx - Friday, September 5, 2008 - link

    A while back I saw a article on turning all the un-needed stuff off that the black viper site recommends. The machines with stuff turned off had nearly identical resource usage and actually performed worse. Since then I've never bothered with all the optimizations. The amount of time you save is way offset by the headache and time spent setting everything up. Reply
  • nortexoid - Wednesday, September 3, 2008 - link

    So far Chrome's been pretty buggy for me. It locks up with flash animations (especially when coming out of fullscreen mode) mostly.

    It has some nice features. In fact one of them, it's autohiding status bar, led me to that very extension for FF3! Yes, I'm still in love with FF3.
    Reply
  • dryloch - Wednesday, September 3, 2008 - link

    There were several pages in the speed test that I have never been to. I went to those pages and they loaded faster then your tests are showing. I have been very impressed with the speed of this browser. So far I say good job Google. Reply
  • npp - Wednesday, September 3, 2008 - link

    It's a nice thing, no doubt, and I'm sure it will make its way through the competition very fast (by the way, as I'm writing this, a nasty bug prevents the lines from being displayed properly...:) It looks good and feels fast, but I simply can't swallow the absence of all the features that make Opera my browser of choice. It may be that they went too far in their minimalistic approach; inability to import settings from any other browser than IE for example, is downright stupid. Other users also pointed out pretty obvious and common features that Chrome is missing right now.

    But then again, it may be that I'm just too paranoid; maybe the majority of users will never miss a feature in Chrome, and I guess google is aiming exactly at them. However, the users who like to customize everything exactly their way and need more control on what's going on are still better off with something like Opera, I guess.
    Reply
  • strikeback03 - Wednesday, September 3, 2008 - link

    Funny, it was the things I couldn't set Opera to do that caused me to not bother reinstalling in my most recent OS upgrade. Reply
  • idomagic - Thursday, September 4, 2008 - link

    Please do give an example. Reply
  • strikeback03 - Thursday, September 4, 2008 - link

    Been about a year and a half, but one I remember is that I could not find where to make Opera not automatically shift to a new tab when opening. When I read news I usually scroll down the headlines and open any I want to read in new tabs, then open the tabs one by one and read. With Opera, each new tab opened and went there, then I immediately had to click back to the main tab to open whatever else I wanted, etc.

    Plus, as mentioned, lack of Adblock is a deal-breaker.
    Reply

Log in

Don't have an account? Sign up now