Ubuntu 21.04 Moves Ahead With Enabling LTO Optimizations For Greater Performance
Written by Michael Larabel in Ubuntu on 20 March 2021 at 08:46 AM EDT. 17 Comments
UBUNTU --
Ubuntu 21.04 is moving ahead with plans to enable compiler link-time optimizations (LTO) by default for package builds in the name of greater performance.

Back in January the plans were discussed for Ubuntu enabling LTO optimizations for packages with Ubuntu 21.04 to yield greater performance by allowing additional compiler optimizations at link-time on the entire binary. This follows the likes of Fedora and openSUSE already employing LTO by default as part of their package builds.

While into the Ubuntu 21.04 feature freeze and just one month out from release, this LTO enablement is finally happening for the Hirsute Hippo.

Uploaded this week was the latest dpkg package that now turns on LTO optimizations. Link-time optimizations are enabled by default for x86_64 (AMD64), ARM64, PPC64EL, and s390x architectures where GCC LTO support is reliable and generally a worthwhile performance improvement.

Matthias Klose further commented on the mailing list for the current state and the plan on black-listing packages that have build issues or other problems with LTO:
This is now turned on by default, a bit later than expected (discussed and approved by Lukasz). The package lto-disabled-list is now seeded with all packages not in main, which regressed with LTO optimizations for some reason.

For the ~80 regressing packages in main, I'll do uploads after the next test rebuild planned for next week, either fixing the regression, or turning off LTO optimizations directly in the package.

Great to see this happening and should help the default GCC 10 compiler on Ubuntu 21.04 help squeeze some extra performance out of the system. Ubuntu 21.04 benchmarks will be heating up on Phoronix in the weeks ahead.
Related News
About The Author
Author picture

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter or contacted via MichaelLarabel.com.

Popular News This Week