New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 849305 link

Starred by 2 users

Issue metadata

Status: Started
Owner:
Last visit > 30 days ago
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 835323



Sign in to add a comment

Investigate making keyed service startup asynchronous

Project Member Reported by skyos...@chromium.org, Jun 4 2018

Issue description

In go/hello-chrome-hackathon we discovered that a number of keyed services are delaying the critical path to browser startup. We should investigate ways of initializing these services more lazily.
 

Comment 2 by gab@chromium.org, Jun 4 2018

Description: Show this description

Comment 3 by gab@chromium.org, Jun 4 2018

Cc: caitkp@chromium.org
Any traces? (couldn't find them in the doc)

CC caitkp who was involved in the aforementioned 2013 attempts, FYI
Here is a trace from a 512MB device (warning: 180MB :)

https://drive.google.com/open?id=1IWL1Szjncf6L7zCKaeSE5IHT7a3MeZ39

This one should be taken with a grain of salt since there is a lot of descheduling happening during native initialization. This one looks a little more realistic (although still very descheduled):

https://drive.google.com/open?id=1gmb-p64UofCJOtw-zllPYpIcammeHAVi

(Working on a doc with more details.)

Comment 5 by gab@chromium.org, Jun 5 2018

Interesting, how do you blame sync from these traces? And history? (Chrome_History thread name? It's about to be coalesced in TaskScheduler workers FWIW)

Any idea why TaskScheduler workers aren't labeled on these traces?

Guessing you only know there are a lot of descheds for blocking I/O but we don't if implicit (paging) or explicit (synchronous reads) I/O?

Excited to read your doc/findings :)
Ah, the way we narrowed this down to the list of services above was by removing them one by one. The numbers for that are here:

https://docs.google.com/spreadsheets/d/1Ch0KLhGUyDStuMcj7gfkWTM4gzB52Emmamm-hxLx-Ww/edit#gid=1870269173

The traces above were taken with a build from a ~month ago so maybe some labeling wasn't there yet?

And yes, the blocking I/O is suspicious and being investigated in bug 849316. I'm fairly certain it's implicit paging, because if we're doing that much reading on the UI thread something is pretty badly wrong :)

Comment 7 by gab@chromium.org, Jun 13 2018

Re. "if we're doing that much reading on the UI thread something is pretty badly wrong :)"

Yeah... well I wouldn't be surprised if something is pretty badly wrong either. We do do a lot of I/O on the UI thread early. There's a policy to allow I/O for initialization until the message loop is started. Some of this I/O is indeed blocking initialization (e.g. reading Local State/field trials), other might be parallelizable but never was.
Ah, you're right, I remember seeing an exception for early startup. I think we're going to do a full I/O activity analysis of startup anyway -- that should highlight problems from explicit reads/writes like that too.

Sign in to add a comment