Announcement

Collapse
No announcement yet.

Squeezing More Juice Out Of Gentoo With Graphite, LTO Optimizations

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Squeezing More Juice Out Of Gentoo With Graphite, LTO Optimizations

    Phoronix: Squeezing More Juice Out Of Gentoo With Graphite, LTO Optimizations

    Developer Shane Peelar has come up with a Gentoo Portage configuration for building out the distribution with aggressive compiler optimizations in the name of performance...

    Phoronix, Linux Hardware Reviews, Linux hardware benchmarks, Linux server benchmarks, Linux benchmarking, Desktop Linux, Linux performance, Open Source graphics, Linux How To, Ubuntu benchmarks, Ubuntu hardware, Phoronix Test Suite

  • #2
    Some packages do not benefit from -O3 optimizations, on the contrary they will perform worse. It will be needed to filter them out from being further optimized.
    Anyway I love the idea of a centralized repository with all the LTO/Graphite overrides for known broken packages.
    ## VGA ##
    AMD: X1950XTX, HD3870, HD5870
    Intel: GMA45, HD3000 (Core i5 2500K)

    Comment


    • #3
      Looks like Michael is suffering from the RAS syndrome :P

      Comment


      • #4
        Graphite is bad. No better way to put this. It causes ICEs in gcc and there are bug reports piling up on it with nobody around to fix them. Options such as -fgraphite-identity and -floop-nest-optimise are still not part of any of the -Ox switches. Looks like it's just going to fall off the wagon at some point.

        LTO of course is working great, but it doesn't always improve the code even when it becomes shorter. Profiling code is still more profitable and only in combination with profiling does LTO begin to shine.

        So I'm holding my breath when I see how some of the Gentoo users crank up compiler optimizations on the big scale. I did follow the LTO thread on the Gentoo forum for a while, but they're really just pushing the "pedal to the metal" to see what breaks. I doubt many of them go the extra mile and run the respective test suites for all the software they're compiling to verify the correctness of the optimizations.

        Comment


        • #5
          Originally posted by sdack View Post
          LTO of course is working great, but it doesn't always improve the code even when it becomes shorter. Profiling code is still more profitable and only in combination with profiling does LTO begin to shine.
          I'd hope the code was profiled already. If not, it is about time.

          It is great to see this work being done and communicated. Kudos to Shane!

          Comment


          • #6
            from the github

            "This repository is a snapshot of my Gentoo Portage configuration. Earlier in 2017, I set out to do an experiment in building Gentoo using the -O3 gcc compiler option. It is well documented on the Gentoo wiki that this is not a recommended configuration, but I wanted to see to what extent things would break. As it turns out, most packages that cannot be built with -O3 are already forced to build with -O2 anyways, so I experienced very few failures. With the success I had using -O3, I decided to make things a little more complicated and toss the Graphite optimizations in the mix. Then I went a bit more daring and tossed in LTO. After about 8 months of doing this, I feel good enough about my configuration that I decided to publish it for interested parties to see. This repository will be actively updated and tested, as it is the basis for my own Portage configuration.
            "

            Fascinating!
            Last edited by AdamOne; 11 September 2017, 07:42 AM.

            Comment


            • #7
              Four years ago: http://yuguangzhang.com/blog/enablin...lto-on-gentoo/

              Comment


              • #8
                Originally posted by sdack View Post
                Graphite is bad. No better way to put this. It causes ICEs in gcc and there are bug reports piling up on it with nobody around to fix them. Options such as -fgraphite-identity and -floop-nest-optimise are still not part of any of the -Ox switches. Looks like it's just going to fall off the wagon at some point.
                gcc-7.2.0 has those bugs fixed. I have graphite on all my packages ( and LTO on selected) and with gcc-7.2.0 I can't remember when a package build has failed due to graphite...

                Comment


                • #9
                  I wish LTO and PGO/FDO were part of standard Arch already :/

                  Comment


                  • #10
                    Originally posted by geearf View Post
                    I wish LTO and PGO/FDO were part of standard Arch already :/

                    Does Arch still have srcpac?
                    You could always set the optimizations and recompile your installed packages and newley installed ones with that instead of pacman.

                    I haven't used Arch for almost 10yrs now so not exactly sure what they have for building from source anymore, if anything.


                    As for Gentoo... It's still one of the best around to learn from. And even hitting up lfs and doing a distro from scratch and then tweaking it to your specific wants is a ton of fun the first couple times around when learning.

                    Go nuts on optimizations and see what works or doesn't then tweak each program for the best performance flags as wanted.

                    Wish I had the time to still do that sort of stuff.... Sigh.....
                    Last edited by MNKyDeth; 11 September 2017, 08:19 AM.

                    Comment

                    Working...
                    X