Chrome Process Notes
I ran through a quick and dirty comparison of Firefox 2.0.0.16 and Chrome 0.2.149.27, running on Windows Vista. I opened each browser side-by-side and added one tab at a time. As I added each tab, I noted the memory usage. I viewed these web pages:
| Tab | Page |
|---|---|
| 1 | google.com |
| 2 | cnn.com |
| 3 | digg.com |
| 4 | reader.google.com |
| 5 | stuffthathappens.com/blog |
| 6 | amazon.com |
Memory Usage
I obtained these numbers from Vista’s task manager. Vista has many different “memory usage” statistics, and I have no idea what each implies. I do not claim these numbers mean anything other than…here are a bunch of numbers.
Here are the numbers from Vista’s “Working Set” column. Note there are multiple numbers for Chrome because each new tab opens one — or more — new processes.
Tabs Firefox Chrome 1 51176 11756 24164 2 78120 11756 12992 24852 25260 3 94084 11756 22080 24860 32304 23932 4 102992 6164 11756 22088 24860 20856 40040 23960 5 116008 6164 18820 11756 22088 24860 20860 43628 24868 6 134360 6164 18820 11756 22088 24616 24860 20444 49192 25624 Dropping back down to 1 tab: 1 111240 11760 35856
Note that Vista’s “Private Working Set” reports different, and lower, numbers:
Tabs Firefox Chrome 6 111476 1096 10792 4080 13852 16792 16656 12368 31608 18564
I should also note that many numbers were constantly changing, so these are all approximations. Vista’s task manager also shows many other columns:
- Peak Working Set
- Working Set Delta
- Commit Size
- Paged Pool
- Non-paged Pool
- etc…
Lessons Learned?
Not much! I’m no Vista programmer, so I don’t know how to interpret these numbers. Here is what I am comfortable saying:
- As I added more tabs, Firefox slowed down. Chrome did not.
- Each new Chrome tab adds one or more processes. It looks like the number of processes depends on what content is on the web site.
- You’d need more detailed memory analysis tools to truly understand what’s going on.
- As I closed tabs, Chrome stops the processes within a few seconds, freeing up memory. Firefox seemed to hang on to memory for a longer time. Again, these are just initial impressions with very limited tools at my disposal.
Chrome is fast, I’m writing this post using it, and it seems to work just fine. In the end, I’m happy to see another competitor because this puts more heat on the other browsers to improve performance and compatibility. This is the kind of browser war was can all be happy with.
I have a friend who’s a windows internals expert and when we were tracking down a javascript memory leak he told me that the default process manager’s (the one that ships with the os) memory reports are only very loosely based on reality and are mostly wrong.
The tools from Sysinternals (the company he’s now a consultant for them and teaches microsoft employees how windows works) are much more accurate. The process monitoring tools are available here: http://technet.microsoft.com/en-us/sysinternals/cb56073f-62a3-4ed8-9dd6-40c84cb9e2f5.aspx
As far as chrome goes, a process is spawned for every tab and every plugin. You can also monitor the memory, cpu and network usage of each, it’s pretty cool.
Another interesting fact: since you wrote and submitted your post in chrome you gave all ip rights to Google to do whatever they want with it. It says so right in the EULA: http://tapthehive.com/discuss/This_Post_Not_Made_In_Chrome_Google_s_EULA_Sucks
Apparently a big enough stink was made about it though that Google’s decided to back down. Doesn’t take long for good will to turn on you, they should be more careful or people will start talking about them the say way they talk about Microsoft.
@Guillaueme nonsense, I didn’t give up any IP rights. I am quite satisfied with Google’s response regarding the EULA “controversy”. http://www.mattcutts.com/blog/google-chrome-license-agreement/
People make mistakes. No big deal. Blown way out of proportion.
Hmm. Why did you compare Chrome to Firefox 2, not to Firefox 3? FF 2 is known for being a memory hog.
Also, 6 tabs is nothing. The real problem occurs once you run out of available memory, and in Chrome it will happen faster (because of the internal ‘new process’ design). Try opening at least 10 tabs and let it run for some time – you will notice the difference.
Chrome is cool, yet it is still vulnerable to XSS and I really miss add-ons there
With the new process per tab, I have noticed that to start with it has 3 processes and that number stays stable as long as you keep opening tabs from within the same domain (checked up to 20 tabs). Then as soon as you open tabs from other domains, it keeps rising with the 1 process per domain. However 1 tab per domain stays true only with regards to certain domains.
I think you want “Private Bytes” not “Working Set” because you’re interested in how much memory the processes are requesting from the OS, not how the OS is granting those requests (RAM vs. Pagefile).
“Commit size” is close, but “private bytes” is more accurate because it will reflect the fact the Chrome is sharing read-only DLL sections across the various processes.
Hi,
Note that you can change the process model:
http://dev.chromium.org/developers/design-documents/process-models
you can even tell chrome to only use one process
Regards,
Markus