LTO Link Time Optimization ? #52
Labels
No Label
blocked upstream
bug
build-failure
duplicate
enhancement
help wanted
informational
invalid
invalid/corrupt package
packaging issue
priority: high
question
support
wontfix
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: ALHP/ALHP.GO#52
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This should probalby add a similar performace boost as v3. Any plans to add this ?
Hi @Lehner82. That should only be a minor change, so yes that can be enabled fairly quickly.
I wouldn't rebuild all packages because of this, but newly build packages would have it enabled.
Ok, thats great to hear
-falign-functions=32 is also used in the offical Intle ClearLinux repos and is recommended on Gentoo to be used alongside LTO. Should boost performance mainly Intel with no regressions on AMD.
Implemented in
7eb1be8371
and715063281a
.knot is the first package build with LTO.
Should we follow GentooLTO on this?
Its probably the best recource for performace focused compiling without placebo out there. GentooLTO has lists for a lot of workarounds too when it comes to LTO, O3, Graphite, and even Ofast. It recommends Graphite to be used alongside LTO so thats probably the next thing to look into.
@Gontier-Julien follow on what exactly? Regarding patches?
Regarding this part:
and i'm agreeing with @Lehner82 on this, they already did a lots of work so that problably going to help with bugs etc
That could be a great source indeed, but if I understood correctly using GentooLTO would require the following:
Alternative to syncing the patches would be to port them to our own format (in this case a structure for ALHP to match patch->pkgbase and the needed patch or modification).
I don't think we need to match gentoo packages to arch packages, since if a packages fail to build, tell for example the structure of ALPH (as you mentioned) to find a pottential patch and apply it.
And even if it where the case, i don't think most of the packages should fail to build, and if it fail to build if there no patch available, try to build it with simple lto.
That has also been my experience with GentooLTO. There were only 2 or 3 packages that failed to build with LTO. I never had any trouble with O3 or graphite, only with Ofast.
Well, LTO is enabled now, so we'll see what fails. If there is something that fails with -O3/LTO we can discuss what needs to be done in that specific case.
Is there something else we can do here? Otherwise we can close this for now.
I think we can close this now
I noticed significant more memory usage building with LTO enabled. For example
xf86-video-intel
is currently building, using a total of 43.6GiB RES.That could overwhelm the buildserver, which only has ~64G available.
I'll continue monitoring. It could result in some packages not being build because the (cgroup) OOM-killer acts on the build process.
Could also be a bug or weird behavior with some packages.
EDIT: Checked the build history, and it seems only some packages have that huge memory usage. Potential blacklist candidates.
I think it a bug, just had some package to build and one had 3x the memory usage
It seem fixed with the next gcc version (11.2):
Thanks for doing the research.
anonfunc referenced this issue2021-11-13 21:37:29 +01:00
I applied most of gentooLTO's package exemptions. The package status page also shows LTO status for packages build from now on (and if they are excluded from building with LTO).
I'm reopening this issue for now since, they're where some news about LTO on the monthly report fo December.
I have seen this mail. Only thing that should change on our side is how LTO is enabled. If upstream now checks if LTO works or needs workarounds/disabling, we can drop some logic handling these cases.
Just as in info, but i think you've might seen it, the new devtools is now in stable
I adjusted ALHP's logic to consider per-default enabled LTO in
5432ea326d
Awesome!
Also thank you for you great work! ^^