Investigate making keyed service startup asynchronous |
|||
Issue descriptionIn 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.
,
Jun 4 2018
,
Jun 4 2018
Any traces? (couldn't find them in the doc) CC caitkp who was involved in the aforementioned 2013 attempts, FYI
,
Jun 5 2018
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.)
,
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 :)
,
Jun 6 2018
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 :)
,
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.
,
Jun 14 2018
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 |
|||
Comment 1 by skyos...@chromium.org
, Jun 4 2018