views:

1251

answers:

9

Hi, I was reading googlebooks on chrome, where they talk about why they decided to spin up a process to host browser tab, every time you created a new tab.' So

2 tabs = 2 chrome processes

3 tabs = 3 chrome processes and so on .. right??

But i opened up some 20 or so tabs, but in task manager, i could only find 3 chrome processes..

What is going on??

I was taught that creating a process is an expensive proposition in terms of resources needed, and there are other light weight options available (like app domains in .net for ex).. So is chrome taking some hybrid approach?? Create few processes and then start hosting additional tabs inside those limited set of processes??

+1  A: 

did you actually browse to a site? or just open up tabs? i open 8, i see 9 processes (one is the manager)

Darren Kopp
A: 

just open up the tabs..

kudlur
A: 

a process isn't created until you start browsing.

Darren Kopp
A: 

But i see some html content in each of those tabs.. like my most visited sites, recent bookmarks, etc.. So where is that content being hosted??

kudlur
A: 

Process creation is relatively expensive, certainly compared to thread creation. But the frequency of process creation in Chrome is very slow, so the real issue is the amount of resource overhead vs other techniques.

The Google team figured that the benefits of a separate process model justified the resource costs. Given the current resources on desktop machines this trade off makes a lot of sense.

Rob Walker
A: 

Just repeating this question, again in response to Darren kopp's response..

But i see some html content in each of those new tabs.. like my most visited sites, recent bookmarks, etc.. So where is that content being hosted??

kudlur
+2  A: 

Don't forget that if two sites share a session, they share a process. So following a link from one site that opens a new page will be in the same session (and thus the same process).

For each tab created with Ctrl+T, you should get a new process.

Brad Wilson
+3  A: 

it's being hosted in the first process. open up chrome. you'll see 2 processes (manager and initial tab). then open 10 more tabs, you'll notice the second process's memory jump a lot. then type in google.com or something into the first tab, and you'll see a new process get spawned.

also notice, if you do shift+esc and brink up the task manager in chrome, all those tabs will be grouped together, one w/ memory, the others without.

Darren Kopp
A: 

I've also noticed that tabs browsing the same domain ar grouped in the same process. So if you have 3 tab browsing stackoverflow.com, those three tabs will appread as one process

Frederic Morin