Search code examples
google-chromeoperating-systemtaskmanager

Does chrome really create a process for each tab?


  • Operating system concepts 9th edition, page 123, "MULTIPROCESS ARCHITECTURE—CHROME BROWSER"
  • At this part, the author said that each tab represents a separate process, but when I look at task manager(windows), there's only one process under "Google Chrome", for example, it's Stack Overflow now, I'm still opening other tabs, why can't I find it in task manager?
  • There're also some other "process", but I think it's "nothing" to do with these tabs, because when there's only one tab, they're still here. So how to understand what the book says?

Solution

  • Chromium supports four different models that affect how the browser allocates pages into renderer processes. By default, Chromium (Chrome) uses a separate OS process for each instance of a web site the user visits. However, users can specify command-line switches when starting Chromium to select one of the other architectures: one process for all instances of a web site, one process for each group of connected tabs, or everything in a single process.

    In my case I have the following situation:

    MacOS: mac os chrome

    Windows: windows chrome

    As you can see, each of tasks has its own PID (process ID)


    Details:

    Also you can refer to Chrome is using 1 process per website instead of per tab, Chrome tabs and processes questions.

    And here is official documentation about process model of Chrome / Chromium.

    Process-per-site:

    Chromium also supports a process model that isolates different sites from each other, but groups all instances of the same site into the same process. To use this model, users should specify a --process-per-site command-line switch when starting Chromium. This creates fewer renderer processes, trading some robustness for lower memory overhead. This model is based on the origin of the content and not the relationships between tabs.

    Process-per-tab:

    The process-per-site-instance and process-per-site models both consider the origin of the content when creating renderer processes. Chromium also supports a simpler model which dedicates one renderer process to each group of script-connected tabs. This model can be selected using the --process-per-tab command-line switch.