Android Chrome-like process model on Linux desktop Chrome

48 views
Skip to first unread message

Minoru Chikamune

unread,
Aug 6, 2020, 9:58:31 AM8/6/20
to Site Isolation Development
Hi,

We'd like to simulate "default process"-mode Android Chrome-like process model on Linux desktop Chrome. Any flags/code we can hack to achieve that?

Charlie Reis

unread,
Aug 6, 2020, 11:11:27 AM8/6/20
to Minoru Chikamune, Site Isolation Development, Alex Moshchuk
[+alexmos]

Can you clarify what your goal is?  If it's to disable full Site Isolation and instead isolate only sites that users log into (as we do on Android), I'm not sure how easy that is due to the need for the component updater to get the list of sites.  You can use chrome://flags/#site-isolation-trial-opt-out on non-enterprise-enrolled builds to turn off full Site Isolation, and I'll let Alex say whether there's a way to simulate the Android "list of sites" behavior on other platforms.

In contrast, "Default process" isn't enabled for any platform, but can be experimented with by enabling the ProcessSharingWithStrictSiteInstances feature.  It causes Chrome to create strict SiteInstances for every site, but allows them to share a process (using OOPIF codepaths even though the frames are in the same process).  It's orthogonal to which sites require dedicated processes, which is controlled by the Site Isolation setting described above.  We don't plan to proceed with this mode directly; the next steps for that are introducing a FrameGroup abstraction, as outlined here:

Hope that helps,
Charlie

Alex Moshchuk

unread,
Aug 6, 2020, 1:40:45 PM8/6/20
to Charlie Reis, Minoru Chikamune, Site Isolation Development
On Thu, Aug 6, 2020 at 8:11 AM Charlie Reis <cr...@chromium.org> wrote:
[+alexmos]

Can you clarify what your goal is?  If it's to disable full Site Isolation and instead isolate only sites that users log into (as we do on Android), I'm not sure how easy that is due to the need for the component updater to get the list of sites.  You can use chrome://flags/#site-isolation-trial-opt-out on non-enterprise-enrolled builds to turn off full Site Isolation, and I'll let Alex say whether there's a way to simulate the Android "list of sites" behavior on other platforms.

Note that chrome://flags/#site-isolation-trial-opt-out turn off all forms of site isolation, so running with that would be closer to what would happen on a low-memory Android device where we don't have any site isolation.  A slightly less heavy-handed way would be to run with --disable-features=site-per-process; if you wanted to run with isolation for sites that users log in to (default Android site isolation mode) on desktop, you can combine that with --enable-features=site-isolation-for-password-sites.

Android also isolates a predefined list of sites, but we've moved away from using the component updater for that.  There's a way to simulate it on desktop, and I can provide instructions if needed, but note also that you can always simulate a particular site being isolated by running with --isolate-origins=https://foo.com (which on desktop will be meaningful when combined with --disable-features=site-per-process).

 

In contrast, "Default process" isn't enabled for any platform, but can be experimented with by enabling the ProcessSharingWithStrictSiteInstances feature.  It causes Chrome to create strict SiteInstances for every site, but allows them to share a process (using OOPIF codepaths even though the frames are in the same process).  It's orthogonal to which sites require dedicated processes, which is controlled by the Site Isolation setting described above.  We don't plan to proceed with this mode directly; the next steps for that are introducing a FrameGroup abstraction, as outlined here:

Right.  Android site isolation uses what we call the "default SiteInstance" mode by default instead.

Minoru Chikamune

unread,
Aug 6, 2020, 10:02:42 PM8/6/20
to Site Isolation Development, Alex Moshchuk, Minoru Chikamune, Site Isolation Development, cr...@chromium.org, Kouhei Ueno
Sorry, I had to describe our goals. Currently, I’m working on per-isolate scheduling. In this project, we are going to create multiple IsolateScheduler in one renderer process in the end. But currently, we can’t create multiple IsolateScheduler properly because we are in the middle of the progress. So temporarily, I created IsolateScheduler per Page to simulate multiple IsolateScheduler. I hoped that we can easily simulate multiple IsolateScheduler in one renderer process, but unfortunately, it seemed not easy.

So in summary:
  • We want to simulate multiple IsolateScheduler for developing or testing purposes.
  • To achieve this, we created IsolateScheduler per Page to simulate multiple IsolateScheduler
  • Android Chrome-like process model seemed promising because most of the page will run in one renderer process.
I tried “--disable-site-isolation-trials” option but it didn’t help because it still creates renderer process per page.

Kouhei Ueno

unread,
Aug 6, 2020, 10:13:08 PM8/6/20
to Minoru Chikamune, Site Isolation Development, Alex Moshchuk, cr...@chromium.org
To unentangle the dependency to the AgentGroup which talp@ is currently working on, the plan is to create an IsolateScheduler per RenderWidget in the meantime.
We want to simulate Android Chrome + "default process", where we have multiple SIs so it would end up creating multiple RenderWidgets -> multiple blink::Pages, but hosted on a single renderer process.

chikamune: Would --disable-features=site-per-process + --enable-features=ProcessSharingWithStrictSiteInstances [cs] work?

--
To unsubscribe from this group and stop receiving emails from it, send an email to site-isolation-...@chromium.org.


--
kouhei

Minoru Chikamune

unread,
Aug 7, 2020, 8:30:44 AM8/7/20
to Site Isolation Development, Kouhei Ueno, Site Isolation Development, Alex Moshchuk, cr...@chromium.org, Minoru Chikamune
The options below worked! Thank you all! Now I can try multiple IsolateScheduler.

./out/Default/chrome --disable-features=site-per-process --enable-features=ProcessSharingWithStrictSiteInstances
Reply all
Reply to author
Forward
0 new messages