Tech

Testing Ubuntu Optimized Version “-O3” for Better Performance

Canonical engineers announced Friday that they are evaluating packages optimized for the “-O3” compiler for Ubuntu Linux. As part of this evaluation of using GCC’s -O3 compiler optimization level instead of -O2 when compiling Ubuntu packages, experimental Ubuntu desktop and server ISOs are available for testing with this change. I ran some initial tests over the weekend to examine the performance difference.

Testing Ubuntu Optimized Version “-O3” for Better Performance

Canonical hasn’t decided whether they will move to the default “-O3” compiler optimization level in the future, but it’s great that they are evaluating it… I hope they decide to do so, or at least for the subset of Ubuntu packages that are very performance sensitive and can benefit from the more aggressive compiler optimization level.

Out of curiosity about the impact on different workloads, I ran some tests of Ubuntu 24.04 LTS cleanly installed out of the box, and then repeated the clean install of Ubuntu 24.04 LTS but using the ISOs created with -O3. All tests were run from a System76 Thelio workstation with the AMD Ryzen Threadripper 7980X processor.

Performance tests optimized for Ubuntu-O3

In addition to the packages on the experimental ISOs being built -O3, the APT repository configuration on those ISOs points to their test archive containing the optimized -O3 packages. So installing new Debian packages and others on top of the installation will also pick up packages from that -O3 archive rather than the official/default Ubuntu archive.

I ran a variety of benchmarks using Ubuntu packages to see the difference between versions of the -O3 package.

Back to top button