[
https://issues.apache.org/jira/browse/IMPALA-13308?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17877102#comment-17877102
]
Joe McDonnell commented on IMPALA-13308:
----------------------------------------
Merged the following commit:
{noformat}
commit 8396d3dec57fc7010af084e848457a496e46ff74
Author: Joe McDonnell <[email protected]>
Date: Sun Aug 18 12:40:16 2024 -0700 IMPALA-13308: Build GCC with profile
guided optimization
GCC has an option to build itself using profile guided
optimization. It collects a profile while building itself
and then uses that to optimize the binary. This seems to
be enough to speed up Impala compilation by about 5%:
Current toolchain GCC (LTO):
real 4m58.416s
user 70m41.989s
sys 6m41.961s
GCC with PGO, no LTO:
real 4m45.360s
user 67m12.081s
sys 6m40.376s
LTO shows little improvement over the PGO numbers, so this
switches back to a non-LTO build to save build time. Avoiding
LTO and using a slightly faster GCC reduces the total build
time by 35 minutes on an internal job.
Testing:
- Ran a build, then used it to build Impala
Change-Id: I9f5850999b05207ddc008d839de2783579eaaf31
Reviewed-on: http://gerrit.cloudera.org:8080/21721
Reviewed-by: Michael Smith <[email protected]>
Tested-by: Joe McDonnell <[email protected]>
{noformat}
> Build toolchain GCC with profile guided optimization
> ----------------------------------------------------
>
> Key: IMPALA-13308
> URL: https://issues.apache.org/jira/browse/IMPALA-13308
> Project: IMPALA
> Issue Type: Improvement
> Components: Infrastructure
> Affects Versions: Impala 4.5.0
> Reporter: Joe McDonnell
> Assignee: Joe McDonnell
> Priority: Major
>
> GCC has an option to build a profiled GCC binary by using the "make
> profiledbootstrap" target. This produces a profile by compiling GCC, so it
> isn't targeted to Impala's codebase, but it still improves GCC compile times
> by about 5%:
> {noformat}
> Time comparison for "make -j16 impalad" (release build):
> Current toolchain GCC (LTO):
> real 4m58.416s
> user 70m41.989s
> sys 6m41.961s
> GCC with PGO, no LTO:
> real 4m45.360s
> user 67m12.081s
> sys 6m40.376s
> GCC with PGO + LTO:
> real 4m42.042s
> user 66m32.943s
> sys 6m39.523s
> # User time comparison:
> Baseline (LTO): 1.000
> PGO,no LTO: 0.951
> PGO+LTO: 0.941{noformat}
> LTO doesn't seem to help much, so maybe it would be better to disable it.
> I don't know how ccache interacts with PGO, but I had it disabled for the PGO
> and PGO+LTO builds.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]