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

Issue 835316 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2018
Cc:
EstimatedDays: ----
NextAction: 2018-04-27
OS: Windows
Pri: 3
Type: Bug



Sign in to add a comment

Renderer startup blocked on creating raster threads

Project Member Reported by sadrul@chromium.org, Apr 20 2018

Issue description

According to the sampling profiler results: https://uma.googleplex.com/p/chrome/callstacks/?sid=5a3c737acdd725269bc8bd51a74064b7 approx. 10% of the non-idle start-up time for the main-thread in the renderer processes is spent on starting up the raster threads. The threads are started synchronously. It may be possible to bring this down a bit by starting the threads asynchronously instead.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Apr 20 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6928fde34e9a06b3079d0e5fcc4593bce2f466e1

commit 6928fde34e9a06b3079d0e5fcc4593bce2f466e1
Author: Sadrul Habib Chowdhury <sadrul@chromium.org>
Date: Fri Apr 20 16:02:51 2018

renderer: Start tile-worker threads asynchronously.

According to the sampling profiler, starting these threads take up
10% of the non-idle startup time on Win10 and Win8 (~5% on Win7).
Try starting these threads asynchronously instead.

To allow for this, turn Start() and Join() on base::SimpleThread into
non-virtual methods. Introduce BeforeStart() and BeforeJoin() virtual
methods so that tests can still do additional work as needed. Then,
introduce base::SimepleThread::StartAsync(), and use that for starting
the raster threads. Also introduce a BeforeRun() virtual method, so
that it is still possible to trigger some tasks after the thread has
been started and initialized asynchronously.

BUG= 835316 

Change-Id: I107c5cc5cf1dd579d2866a1feca6fd583b8f5577
Reviewed-on: https://chromium-review.googlesource.com/1015236
Commit-Queue: Sadrul Chowdhury <sadrul@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#552344}
[modify] https://crrev.com/6928fde34e9a06b3079d0e5fcc4593bce2f466e1/base/threading/simple_thread.cc
[modify] https://crrev.com/6928fde34e9a06b3079d0e5fcc4593bce2f466e1/base/threading/simple_thread.h
[modify] https://crrev.com/6928fde34e9a06b3079d0e5fcc4593bce2f466e1/content/renderer/categorized_worker_pool.cc
[modify] https://crrev.com/6928fde34e9a06b3079d0e5fcc4593bce2f466e1/content/renderer/categorized_worker_pool.h
[modify] https://crrev.com/6928fde34e9a06b3079d0e5fcc4593bce2f466e1/content/renderer/render_thread_impl.cc
[modify] https://crrev.com/6928fde34e9a06b3079d0e5fcc4593bce2f466e1/ppapi/proxy/tracked_callback_unittest.cc

Comment 2 by sadrul@chromium.org, Apr 20 2018

NextAction: 2018-04-27
I will revisit in a week to see if this actually made a difference.

Comment 3 by sadrul@chromium.org, Apr 25 2018

Cc: tdres...@chromium.org rbyers@chromium.org jbroman@chromium.org
Status: Fixed (was: Started)
The profiler-difference between 68.0.3401.0-Canary and 68.0.3402.0-Canary show approx. 70.5ms improvement, or 8.5%, in renderer-process main-thread non-idle startup time (specifically, in content::RenderThreadImpl::Init()) : https://uma.googleplex.com/p/chrome/callstacks/?sid=3d032fa5512bda625b115a02ee0939a1

This aligns with my expectation. So I think I am going to close this as fixed.

/cc'ing a few folks who may be interested. We still don't have an owner for v8-stack unwinding for the sampling profiler to work with v8 stacks *hint* :) https://bugs.chromium.org/p/chromium/issues/detail?id=788808#c19
Cc: mariakho...@chromium.org
+Maria

What's the status of mobile startup benchmarks? Is there a benchmark we should run via a tryjob to get a sense of overall impact here?
experimental.startup.android.coldish is our latest and greatest, though we haven't switched system health away from start_with_url.{cold, warm}.startup_pages yet. Both are pretty short benchmarks, so you could try them both. I don't know if the new one is available via a tryjob yet, though.
Project Member

Comment 7 by 42576172...@developer.gserviceaccount.com, Apr 25 2018

📍 Job complete. See results below.
https://pinpoint-dot-chromeperf.appspot.com/job/15869419c40000
The NextAction date has arrived: 2018-04-27

Sign in to add a comment