Announcement

Collapse
No announcement yet.

Cloudflare Praises Golang PGO For Significant CPU Savings

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

  • Cloudflare Praises Golang PGO For Significant CPU Savings

    Phoronix: Cloudflare Praises Golang PGO For Significant CPU Savings

    Released over a year ago was Golang 1.20 with support for Profile Guided Optimizations (PGO) and has since been improved with Go 1.21 for 2~7% faster Go binaries thanks to this optimization approach also found with other compilers. The engineers at Cloudflare have put out a blog post this week praising Go's PGO support and the CPU savings they are seeing as a result...

    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
    Are there even any distributions which use PGO:ed packages in their repository?

    Comment


    • #3
      Originally posted by Kjell View Post
      Are there even any distributions which use PGO:ed packages in their repository?
      Clear Linux for some packages
      Michael Larabel
      https://www.michaellarabel.com/

      Comment


      • #4
        Originally posted by Kjell View Post
        Are there even any distributions which use PGO:ed packages in their repository?
        CachyOS, we are trying to PGO most core packages ,like GCC, Python, nodejs, zstd, lz4, ....

        archlinux does actually use at python PGO, but consider also to drop it for reproducebility.

        Comment


        • #5
          Originally posted by ptr1337 View Post

          CachyOS, we are trying to PGO most core packages ,like GCC, Python, nodejs, zstd, lz4, ....

          archlinux does actually use at python PGO, but consider also to drop it for reproducebility.
          CachyOS should also build clang with PGO, the distro clang is just too slow.

          Comment


          • #6
            I guess JVM users roll their eyes on this. As much as I despise the JVM, their runtime optimizations are pretty awesome, and they do that for ages already.

            Comment


            • #7
              Originally posted by edxposed View Post

              CachyOS should also build clang with PGO, the distro clang is just too slow.
              Actually, you are right there. We already made local testings about that, but since archlinux is compiling an dynamic clang, there was only a minimal benefit seen from around 8% PGO'ng the "llvm" and "clang" package.
              We would generally move to a different build system for LLVM and go away from the "archlinux" way, but this could break a lot of packages and would need maintainance. Generally were planning to work more on this in the future in our testing repository.

              Anyways, you can find an optimized clang, which is optimized with PGO, LTO and BOLT here:


              This actually way faster compared to the default llvm for around 50-70% on the kernel compilation.

              Comment


              • #8
                Originally posted by Kjell View Post
                Are there even any distributions which use PGO:ed packages in their repository?
                NixOS has it as an optional in a few packages like Firefox: https://github.com/NixOS/nixpkgs/blo...common.nix#L98

                However, reproducibility prevented it from being used in gcc as a default so I think it's safe to say it will never be turned on by default system-wide: https://github.com/NixOS/nixpkgs/pull/112928

                I haven't used it myself though.

                Comment


                • #9
                  Originally posted by aksdb View Post
                  I guess JVM users roll their eyes on this. As much as I despise the JVM, their runtime optimizations are pretty awesome, and they do that for ages already.
                  also, most JVM runtimes continuosly gather statistic and optimize accordingly to the specific conditions.
                  of course there are tradeoffs for that (bigger runtime, memory consumption)

                  being both a Java and Go developer let me choose the best tradeoffs for every project

                  Comment


                  • #10
                    Only useful for big-tech as I see it. Not for the average joe

                    Comment

                    Working...
                    X