Closed Bug 1834815 Opened 2 years ago Closed 2 years ago

Use full LTO + cross LTO for shippable binaries

Categories

(Firefox Build System :: General, task)

task

Tracking

(firefox117 fixed)

RESOLVED FIXED
117 Branch
Tracking Status
firefox117 --- fixed

People

(Reporter: sergesanspaille, Assigned: sergesanspaille)

References

(Regressed 1 open bug)

Details

(Keywords: perf-alert)

Attachments

(1 file)

Using FullLTO combined with cross LTO yields faster binaries on Linux and Windows, as hinted by perfherder results:

For our builder to be able to compile fx in full lto, we cannot use the same debug level as we used to, as it generates too much debuginfo. Alternatives are

  • -g0: disable debug
  • -gline-tables-only
  • -g1

What do build times look like?

Wrt. build times, we're not doing the runs on the same machines (using xlarge suffixes setup for FullLTO builds) yet we see a big impact on compilation time (just for the final FullLTO + PGO runs). All these digits are taken from the above runs.

linux: from 50m to 65m
win64: from 46m to 80m
osx64 (aarch64): 46m to 72m

Given an infinite number of user and a finite number of builds, the overall gain is in favor of spending more time compiling and less time running, but this also has a great impact on automation and developer time.

Which builds will need this full level of optimization? And how many of such builds are done a day?

My guess is that this would be 'shippable' builds. If there's a strong correlation between normal PGO builds and these builds (and I imagine there is, though not 100% correlated), we could do most performance tests against regular PGO builds, and run these builds less often (perhaps only on Nightly builds), or once an hour, or some such. The per-checkin-ish builds are mostly looking for significant performance wins/losses from a checkin; almost all of those would be correlated across opt/PGO/LTO in practice. In the odd case where a regression wasn't picked up in PGO but showed up in LTO a) it's unlikely to be large, b) we can do regression runs to bisect and find the checkin that caused it.

This would require another type of build in addition to PGO, and slightly complicate our monitoring and sheriffing.

This has an important impact on compilation time, so we limit that to
shippable builds.

The benefit on speedometer time is not significant on macosx build, so
we skip that platform.

Thanks Jesup, I've pushed a first patch that activates full lto for all pgo builds. I'm also concerned by the impact on build time. Glandium, would that be okay to limit that to builds with the shippable suffix?

See Also: → 1836761
Pushed by sguelton@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/502f57bb0ebb Enable full+cross LTO by default for shippable Linux and Windows build r=glandium
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 117 Branch
Regressions: 1842032
Regressions: 1841947
Regressions: 1842759

(In reply to Pulsebot from comment #7)

Pushed by sguelton@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/502f57bb0ebb
Enable full+cross LTO by default for shippable Linux and Windows build
r=glandium

== Change summary for alert #38934 (as of Fri, 07 Jul 2023 01:51:54 GMT) ==

Improvements:

Ratio Test Platform Options Absolute values (old vs new) Performance Profiles
3% wikipedia LastVisualChange windows10-64-shippable-qr bytecode-cached fission warm webrender 761.26 -> 739.12 Before/After
3% webaudio windows10-64-shippable-qr fission webrender 96.71 -> 94.25 Before/After

For up to date results, see: https://treeherder.mozilla.org/perfherder/alerts?id=38934

Keywords: perf-alert
Regressions: 1843288
Regressions: 1851963
Regressions: 1853063
Regressions: 1860005
Regressions: 1871443
No longer regressions: 1871443
Regressions: 1878517
See Also: → 1567950
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: