Understanding Multi-process Model in Chrome

3,297 views
Skip to first unread message

Yuhao Zhu

unread,
Dec 1, 2011, 9:34:02 PM12/1/11
to chromi...@chromium.org
Hi All,

I am new to this community.  I basically want to understand how Chrome's multi-process/threading works.  I did take a look at a few documentations w/r to this, but they couldn't help me understand the following results which I got by running htop command in Linux.

  PID USER     PRI  NI  VIRT   RES   SHR S CPU% MEM%   TIME+  Command
14627 yuhao     20   0  268M 17292 12784 S  0.0  0.4  0:00.03  `- /opt/google/chrome/chrome --type=zygote
14718 yuhao     20   0  931M 67560 36348 S  0.0  1.8  0:10.81  |   `- /opt/google/chrome/chrome --type=renderer --enable-accelerated-2d-canvas --lang=en-US -
14723 yuhao     25   5  931M 67560 36348 S  0.0  1.8  0:00.07  |   |   `- /opt/google/chrome/chrome --type=renderer --enable-accelerated-2d-canvas --lang=en-
14722 yuhao     20   0  931M 67560 36348 S  0.0  1.8  0:00.00  |   |   `- /opt/google/chrome/chrome --type=renderer --enable-accelerated-2d-canvas --lang=en-
14721 yuhao     20   0  931M 67560 36348 S  0.0  1.8  0:00.94  |   |   `- /opt/google/chrome/chrome --type=renderer --enable-accelerated-2d-canvas --lang=en-
14629 yuhao     20   0 1131M  3132  2404 S  0.0  0.1  0:00.00  |   `- /opt/google/chrome/nacl_helper_bootstrap /opt/google/chrome/nacl_helper --at-zero
14619 yuhao     20   0 1231M 72924 40260 S  0.0  1.9  0:05.62  `- /opt/google/chrome/chrome
14742 yuhao     20   0 1231M 72924 40260 S  0.0  1.9  0:00.00  |   `- /opt/google/chrome/chrome
14741 yuhao     20   0 1231M 72924 40260 S  0.0  1.9  0:00.00  |   `- /opt/google/chrome/chrome
14740 yuhao     20   0 1231M 72924 40260 S  0.0  1.9  0:00.01  |   `- /opt/google/chrome/chrome
14739 yuhao     20   0 1231M 72924 40260 S  0.0  1.9  0:00.01  |   `- /opt/google/chrome/chrome
14732 yuhao     20   0 1231M 72924 40260 S  0.0  1.9  0:00.00  |   `- /opt/google/chrome/chrome
14720 yuhao     20   0 1231M 72924 40260 S  0.0  1.9  0:00.00  |   `- /opt/google/chrome/chrome
14709 yuhao     20   0  379M 85516 32532 S  0.0  2.2  0:05.12  |   `- /opt/google/chrome/chrome --type=gpu-process --channel=14619.0x7fbdbbf74000.845640879 -
14711 yuhao     20   0  379M 85516 32532 S  0.0  2.2  0:00.03  |   |   `- /opt/google/chrome/chrome --type=gpu-process --channel=14619.0x7fbdbbf74000.8456408
14710 yuhao     20   0  379M 85516 32532 S  0.0  2.2  0:00.46  |   |   `- /opt/google/chrome/chrome --type=gpu-process --channel=14619.0x7fbdbbf74000.8456408
14708 yuhao     20   0 1231M 72924 40260 S  0.0  1.9  0:00.00  |   `- /opt/google/chrome/chrome
14653 yuhao     20   0 1231M 72924 40260 S  0.0  1.9  0:00.21  |   `- /opt/google/chrome/chrome
14648 yuhao     20   0 1231M 72924 40260 S  0.0  1.9  0:00.00  |   `- /opt/google/chrome/chrome
14646 yuhao     20   0 1231M 72924 40260 S  0.0  1.9  0:00.48  |   `- /opt/google/chrome/chrome
14645 yuhao     20   0 1231M 72924 40260 S  0.0  1.9  0:00.00  |   `- /opt/google/chrome/chrome
14644 yuhao     20   0 1231M 72924 40260 S  0.0  1.9  0:00.00  |   `- /opt/google/chrome/chrome
14643 yuhao     20   0 1231M 72924 40260 S  0.0  1.9  0:00.00  |   `- /opt/google/chrome/chrome
14642 yuhao     20   0 1231M 72924 40260 S  0.0  1.9  0:00.00  |   `- /opt/google/chrome/chrome
14641 yuhao     20   0 1231M 72924 40260 S  0.0  1.9  0:00.01  |   `- /opt/google/chrome/chrome
14639 yuhao     20   0 1231M 72924 40260 S  0.0  1.9  0:01.06  |   `- /opt/google/chrome/chrome
14638 yuhao     20   0 1231M 72924 40260 S  0.0  1.9  0:00.05  |   `- /opt/google/chrome/chrome
14637 yuhao     20   0 1231M 72924 40260 S  0.0  1.9  0:00.00  |   `- /opt/google/chrome/chrome
14636 yuhao     20   0 1231M 72924 40260 S  0.0  1.9  0:00.03  |   `- /opt/google/chrome/chrome
14634 yuhao     20   0 1231M 72924 40260 S  0.0  1.9  0:00.04  |   `- /opt/google/chrome/chrome
14633 yuhao     20   0 1231M 72924 40260 S  0.0  1.9  0:00.00  |   `- /opt/google/chrome/chrome
14632 yuhao     20   0 1231M 72924 40260 S  0.0  1.9  0:00.00  |   `- /opt/google/chrome/chrome
14631 yuhao     20   0 1231M 72924 40260 S  0.0  1.9  0:00.00  |   `- /opt/google/chrome/chrome
14625 yuhao     20   0  818M  8972  2980 S  0.0  0.2  0:00.24  |   `- /opt/google/chrome/chrome
14702 yuhao     20   0  818M  8972  2980 S  0.0  0.2  0:00.00  |       `- /opt/google/chrome/chrome

Seems like there are two main processes (in bold).  What's the difference between them?   Which one is the so called "Browser process"?  Since I had only one tab opened, I guess process 14718 is the "Rendered process" for it?  But what is process 14629?  Also, for that renderer process, it has three children processes.  What are they?  Also, for process 14619, what are those children processes for?

Thanks,
Yuhao

Nico Weber

unread,
Dec 1, 2011, 9:37:10 PM12/1/11
to yuhao.r...@gmail.com, chromi...@chromium.org
Hi Yuhao,

you can click the gear icon on the upper right, then Tools, then Task
Manager. Then right-click the table heading in the dialog that opens
and check "Process ID". That's an easy way to find out which process
belongs to which renderer / the browser.

Nico

> --
> Chromium Developers mailing list: chromi...@chromium.org
> View archives, change email options, or unsubscribe:
> http://groups.google.com/a/chromium.org/group/chromium-dev

Adam Langley

unread,
Dec 1, 2011, 9:50:52 PM12/1/11
to yuhao.r...@gmail.com, chromi...@chromium.org
On Thu, Dec 1, 2011 at 9:34 PM, Yuhao Zhu <yuhao.r...@gmail.com> wrote:
> I am new to this community.  I basically want to understand how Chrome's
> multi-process/threading works.  I did take a look at a few documentations
> w/r to this, but they couldn't help me understand the following results
> which I got by running htop command in Linux.

See http://code.google.com/p/chromium/wiki/LinuxZygote about the
--type=zygote process.


Cheers

AGL

Yuhao Zhu

unread,
Dec 1, 2011, 10:04:03 PM12/1/11
to Nico Weber, chromi...@chromium.org
Hi Nico,

In comparing with task manager, it's now clear that 14619 is the Browser process.  But what are so many children processes of it for?  It's also clear that 14718 is the Renderer process, but again what are the three children processes of it for?

Thanks,
Yuhao

Chris Palmer

unread,
Dec 1, 2011, 10:05:42 PM12/1/11
to yuhao.r...@gmail.com, chromi...@chromium.org

Adam Langley

unread,
Dec 1, 2011, 10:07:23 PM12/1/11
to yuhao.r...@gmail.com, Nico Weber, chromi...@chromium.org
On Thu, Dec 1, 2011 at 10:04 PM, Yuhao Zhu <yuhao.r...@gmail.com> wrote:
> In comparing with task manager, it's now clear that 14619 is the Browser
> process.  But what are so many children processes of it for?  It's also
> clear that 14718 is the Renderer process, but again what are the three
> children processes of it for?

The children of 14718 all have exactly the same memory numbers, which
means that you're probably seeing threads within the renderer process.


Cheers

AGL

Reply all
Reply to author
Forward
0 new messages