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

Issue 889742 link

Starred by 7 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Disable AFDO for perf bot microbenchmarks

Project Member Reported by g...@chromium.org, Sep 27

Issue description

In official builds of Chrome on Android and Linux, we use a feedback-directed optimization called AFDO.

AFDO is simple at heart: profile Chrome's execution while it's running benchmarks, rebuild Chrome with that profile, and watch in awe as the compiler does a much better job at optimizing your code on the whole. :)

Sadly, because there's noise in this process, AFDO can cause a meaningful amount of noise in targeted microbenchmarks, such as many of blinks (e.g. the cliffs in https://chromeperf.appspot.com/report?sid=fc03c03dbd28ad909674bc437770ab835bd6ff8a8db5073bd9dd47cb83450eaf&start_rev=554911&end_rev=594140 ).

Most of these metrics are developer-focused (i.e. our users don't directly care deeply about them). Additionally, since AFDO's scope is the entirety of the browser, we use high-level benchmarks, like speedometer, to tell if AFDO is a help to us or not.

Hence, having AFDO on for microbenchmarks like these seems to provide no value to the end-user, negative signal to our developers, and a fair amount of headache for me.

So, we should find these benchmarks where AFDO is making noise for zero gain, and we should turn it off. If we can tweak `gn` args, this is as simple as adding `clang_use_default_sample_profile = false`.
 
FWIW, I plan on identifying microbenchmarks by basically going down the list of bugs filed against me in the last N months and looking for noise. I assume anything in blink.* would be a good candidate, as well as (potentially) rasterize_and_record_micro.*

I'm also happy to take suggestions, though my feeling is that we should keep this restricted to benchmarks that're truly microbenchmarks. Again, we need to get *some* signal to be sure that AFDO is helping, so page cyclers/speedometer/etc should keep it on.
Cc: fergal@chromium.org
With these benchmarks, I usually see a _ref timeseries too. This seems to correspond to passing --browser=reference to something that runs the test, I haven't managed to dig far enough to find out what exactly the reference browser is but maybe that's the stable timeseries.
Here's the layout team's perf bug where they are hitting something very similar.

https://crbug.com/884388
I fully support turning this off for blink_perf.layout_ng and probably also blink_perf.layout. Changes caused by afdo are not actionable for us.

Cc: cbiesin...@chromium.org
Btw, it seems that the afdo roll affects an android/ directory but in practice also affects Linux builds?
> Btw, it seems that the afdo roll affects an android/ directory but in practice also affects Linux builds?

Yup! That's mostly a historical artifact, since AFDO landed on Android before we considered applying it to Linux. We can move it if people really want; I haven't because its initial landing caused a few nonobvious-to-me breakages in our release process, and no one's really seemed to care about the awkward placement otherwise.

Android and Linux are intended to use the same profile, though. So any place we put it should be applicable to both of them.
Ok thanks! Maybe the autoroll commit message can mention that despite the
name it also applies to Linux
Project Member

Comment 9 by bugdroid1@chromium.org, Sep 28

The following revision refers to this bug:
  https://skia.googlesource.com/buildbot/+/2c30437d409ad5a2530da9bd0c24af99a16c8d7a

commit 2c30437d409ad5a2530da9bd0c24af99a16c8d7a
Author: Eric Boren <borenet@google.com>
Date: Fri Sep 28 12:07:59 2018

[autoroll] Update AFDO roller commit message to indicate Linux+Android

Bug: chromium:889742
Change-Id: I404f4b449960051f2508091ccecebd468ed10d83
Reviewed-on: https://skia-review.googlesource.com/157720
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Eric Boren <borenet@google.com>

[modify] https://crrev.com/2c30437d409ad5a2530da9bd0c24af99a16c8d7a/autoroll/go/repo_manager/chromium_afdo_repo_manager.go

A sampling of recent noise-related bugs I've received, for reference:
- issue 886775 (blink_perf.bindings)
-  issue 887348 ,  issue 886889 ,  issue 886783  (all of these were due to a profile flake, which happens very rarely -- once per 1-2 months -- but does happen. All rasterize_and_record_micro.top_25)
- issue 886678 (rasterize_and_record_micro.top_25)
-  issue 878918  (blink_perf.canvas)
-  issue 883751  (blink_perf.parser)
-  issue 877606  (blink_perf.canvas)
-  issue 880443  (blink_perf.image_decoder)
- issue 884388 (blink_perf.layout_ng, as fergal@ noted above)

...Which points to the prime candidates being `rasterize_and_record_micro.top_25` and `blink_perf.*`.

I sent off a thread asking about how to actually go about doing this, since I'm a bit out of my element here. Looks like it's reaching the right people.

After we figure out the best way to toggle this for individual benchmarks, I'll poke owners of the above benchmarks to get their thoughts. Probably on individual CLs. Stay tuned. :)
Hot off the presses,  issue 890897  (blink_perf.css) also shows a benchmark with a lot of historical AFDO-roll-correlated noise.
Cc: nedngu...@google.com dalecur...@chromium.org eyaich@chromium.org crouleau@chromium.org
Components: Speed>Benchmarks
I think media_perftests may also be a candidate for AFDO disabling. +Dale

We should do this work carefully since adding new builders and testers does add complexity which will need to be maintained. +Ned mentioned this in the code review.
 https://crbug.com/897126  another one for image_decoder.
Cc: g...@chromium.org lfg@chromium.org toyoshim@chromium.org
 Issue 911979  has been merged into this issue.
Cc: alexclarke@chromium.org
 Issue 903170  has been merged into this issue.

Comment 16 by g...@chromium.org, Yesterday (31 hours ago)

 Issue 923371  has been merged into this issue.

Comment 17 by g...@chromium.org, Today (8 hours ago)

Cc: chiniforooshan@chromium.org
 Issue 918528  has been merged into this issue.

Comment 18 by nedngu...@google.com, Today (7 hours ago)

Cc: -nedngu...@google.com

Sign in to add a comment