Chromium Memory Usage

Thursday, August 06, 2009

There's been some public discussion lately about memory usage in Google Chrome. We think about our memory usage quite a bit so we're happy to see other people paying attention too. This has been a topic of discussion before, but our multiprocess architecture makes measuring memory utilization difficult with the standard set of tools. The crux of the problem is that Chromium goes to great lengths to share memory between processes. However, that shared memory is difficult to account for in the Windows Task Manager. On Windows XP, using the default Task Manager measurement of memory leads to double counting. On Vista, using the default view leads to under counting.

There are a couple of more accurate ways to measure memory utilization in Chromium (or Google Chrome). The easiest is to crack open the task manager that is built into Chromium which tries to account for our memory usage more holistically. If you want even more detail, you can click on "Stats for nerds" which is a link to about:memory.



If you don't fully trust Chromium's task manager or about:memory, the gold standard for measuring memory usage is to look at the system's total commit charge before, during, and after using Chromium. It's a little tricky to get right because you'll need to shut down other services that may kick in while you are running your test. Here's the basic procedure:
  1. Shut down any unnecessary services
  2. Reboot your computer
  3. Using the windows task manager, measure the Total Commit Charge of the system*
  4. Run the application you are seeking to test, in this case, Chromium
  5. Measure the Total Commit Charge again
  6. Close the application
  7. Measure the Total Commit Charge one more time
  8. Subtract your first measurement from your second, and you should have the memory used by Chromium
  9. To validate your test, make sure that the first and last measurement are nearly identical
*On XP, Commit Charge shows up on the bottom of the Windows Task Manager. On Vista, look at the Performance tab of the Windows Task Manager and use the "Memory" number.

For more information on memory usage and how to measure it, check out the Memory Usage Backgrounder on chromium.org.

13 comments:

ombzzz said...

*On XP, Commit Charge shows up on the bottom of the Windows Task Manager. On Vista, look at the Performance tab of the Windows Task Manager and use the "Memory" number.

What about Linux users?

Thanks in advance

Josh said...

What about Linux users? The question is actually the answer. Chrome does not run on Linux (yet).

http://www.google.com/chrome/intl/en/linux.html

xaethos said...

There is a development version of Chrome for Linux that generally works. I'm checking this page from it. The task manager shows nonsensical information though, and about:memory doesn't load.

Nobu said...

Chromium's task manager on Linux does show sensible information sometimes, but 141GB (148,025,024K) for two tabs is a bit insane if you ask me. ^^;

That said, I understand it's under heavy development and that it is fairly incomplete in some areas.

Neil said...

I assume that this is being addressed at a high level in part because of Randall Kennedy's blistering review in last week's InfoWorld. (http://www.infoworld.com/d/windows/will-chrome-os-collapse-under-weight-its-own-web-browser-050)

My own experience with the new beta mirrors his: memory usage is OUT OF CONTROL. After I first downloaded this version (3.0.95.6), I popped a bunch of tabs to read news, blog posts, etc. At 11 tabs my system memory usage had gone from under 800Mg to 3.5Gb. This was all Chrome and easy to replicate, but oddly Chome's about:memory only showed about 160Mb usage, and the individual process threads in Task Manager were relatively small. Yet when I open and close tabs I see huge jumps/drops in total system memory usage. Something weird is going on...

Marko said...

I've been using Chromium for a week on Linux and I have get rid of Firefox already. The main reason: Chromium is very fast on my very old Xubuntu machine!

I was thinking of getting a new machine, but I really don't need to now! Hope you keep focusing on speed and performance! Thanks!

Dahlia said...

Testing. The new Chrome beta takes quite a bit to open... hmm...

Neil said...

Follow-up to my previous post:
The memory problems I'm seeing all come from flash. I'm running the latest plugin (10.0 r32).

Try opening http://www.networkworld.com/community/node/44460?source=NWWNLE_nlt_daily_am_2009-08-18

Scroll to the bottom of the page to initialize all flash objects. Open Task Manager. You'll see flash using an outrageous amount of memory to display those 4 flash-based ads.

Is there anything that the Chromium team can do about this, or is it all in Adobe's hands?

Dwayne and Teresa said...

Following up with Neil's posts - not only is Flash causing major issues with eating up the memory. Java is a loose hound. Just this morning, 6 browser crashes during attempts to enter Farmville in Facebook with Firefox. FarmTown is the same way. I've already manually deleted all the old updates installed by Java. Should I be doing the same with Flash - and any other, at that rate?

Telain said...

I used Chrome in Windows and was impressed -- thinking, "I wish I had something like this for Linux".

Yesterday I installed the Chrome dev installation for Debian...

http://dev.chromium.org/getting-involved/dev-channel

So far it's been great! It loads so fast I'm thinking I can use it on my low-end laptops now.

I'd never realized browsers were that bloated...

dp11 said...

On this laptop Chrome is very slow coming out of hibernation as the HDD is slow, when memory has grown. Quiting chrome before hibernation and resarting is a lot faster then leaving chrome open I think

http://www.angelfire.com/gundam/lundin00/ said...

While looking at a video from YouTube you have to wait repetedly du to buffering, garbage! OK, the second run ought to be correct showed, yes? No, only the Internet Explorer manages a enjoable second show! I feel i have to uninstall Chrome due to this failure. Garbage! Understand, yes?

ルカパパ(lukepapa) said...

Can the personal computer of XP use that everything including data can be done on Web if most of the application that Google offers becomes the web basic?
It is the enjoyment!