New issue
Advanced search Search tips

Issue 733312 link

Starred by 2 users

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocked on:
issue 683377
issue 733303

Blocking:
issue 595987



Sign in to add a comment

Need to lower the priority of the TDI renderer process

Project Member Reported by lukasza@chromium.org, Jun 14 2017

Issue description

TopDocumentIsolation feature (tracked by issue 595987) can put some cross-site subframes into a separate renderer process (to isolate performance of the top document from the performance of the frames put into the TDI process).  Ideally, the TDI renderer process should:
1) run with a lower priority from the main content renderer
2) be the first candidate for being killed when we are low on resources (memory or otherwise).

Note that the above is true even if the TDI content is being rendered in a foreground tab (we want to sacrifice the TDI process to help improve performance and OOM rates of the main content).

Let's use this bug for figuring out how to tell the rest of Chrome that the TDI renderer should be treated as low priority.
 
Blockedon: 683377
Cc: agrieve@chromium.org
Part of this is tracked by  issue 683377  (about giving hints to the Android OS to kill the TDI process first), but maybe it is still worth it to keep this as a more generic bug (e.g. I hope that there is also a way to tell Chrome to first discard TDI process + it feels that deprioritizing the TDI process should be based on generic, OS-agnostic mechanisms in Chromium [i.e. it feels that BIND_ABOVE_CLIENT should apply to any low priority process, not just to a TDI process]).
Labels: Proj-TopDocumentIsolation
Maybe the TDI process should be "backgrounded" by RenderProcessHostImpl::UpdateProcessPriority?

- AFAIR Chrome applies some pretty aggressive interventions to background processes (i.e. throttling granularity of javascript timers), so I am not sure if a "background" priority is the right priority for the TDI process.

- An extra difficulty is that TDI process hosts content from multiple tabs (some of them visible and some not).  Right now |should_background| in RenderProcessHostImpl::UpdateProcessPriority looks if |visible_widgets_| is 0 -
 such process-wide policy might me inappropriate in case of the TDI process.

Comment 4 by nasko@chromium.org, Jun 16 2017

My 2c is that we need to run the TDI process in normal priority. The reason is that the content of at least one frame in that process will be visible to the user and should be responsive. We get the performance separation already by splitting the main frame from the subframe across processes, so I don't think it is necessary to go further and decrease the OS level priority of the process. 
Being the first to be killed on low resources is definitely a good thing though and should be our policy.

Comment 5 by ojan@chromium.org, Jun 16 2017

+1. The only thing we should change for initial release is the Android bindings so the OOM killer kills the TDI process first.

We might learn things after the first release about other priority stuff we might want to do, but I suspect it will be subtle and complicated.

Comment 6 by ojan@chromium.org, May 8 2018

Cc: -ojan@chromium.org

Sign in to add a comment