Fedora Stakeholders Debate Statically Linking Python For Better Performance

Written by Michael Larabel in Fedora on 8 November 2019 at 12:00 AM EST. 85 Comments
FEDORA
A surprisingly controversial proposal for Fedora 32 is to shift from dynamically linking Python 3 with the libpython3.X.so library to static linking. The change can yield double digit percentage improvements to Python scripts but at the cost of larger on-disk space.

There is a change proposal for next spring's Fedora 32 release to switch to static linking with Python 3 and its library. A 5~27% improvement has been reported as the possible benefit to Fedora though that may vary depending upon the actual Python workload.

With statically linking Python 3, the profile guided optimizations (PGO) or link-time optimizations (LTO) already employed by the Fedora packaging should see further performance benefits.

Those opposing this change proposal on the mailing list seem to be primarily against the proposal on the basis of the static linking causing ~3MB greater size for the package.

We'll see how this proposal goes as the Fedora 32 work gets further along and the Fedora Engineering and Steering Committee weigh this possible change for faster Python performance.
Related News
About The Author
Michael Larabel

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, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week