Announcement

Collapse
No announcement yet.

Benchmarking The Linux 5.19 Kernel Built With "-O3 -march=native"

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

  • Benchmarking The Linux 5.19 Kernel Built With "-O3 -march=native"

    Phoronix: Benchmarking The Linux 5.19 Kernel Built With "-O3 -march=native"

    Following the upstream discussions over -O3'ing the Linux kernel last month I ran some fresh benchmarks of the Linux kernel built with -O2 versus -O3. After the -O3 optimized kernel build results weren't too impressive, a number of Phoronix readers were virtually shouting that "-O3 -march=native" is where it's at for fun and performance... To appease those, here are those numbers...

    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
    Oh that is interesting. This is truly suprising!

    Comment


    • #3
      Poor Gentoo users who have always insisted on building everything with -march=native. LOL.

      Oh, and the -O3 kernel is so much faster faster than -O2, the whole percent, and that's on a CPU with lavish L2/L3 caches. Wow. So many comments earlier, so much pain.
      Last edited by birdie; 13 July 2022, 06:51 AM.

      Comment


      • #4
        And the entire benefit of Gentoo gone out the window with a single article... nice

        Comment


        • #5
          Okay, unexpected, so thanks for the tests!

          Any explanations for these results?

          Comment


          • #6
            Originally posted by reba View Post
            Okay, unexpected, so thanks for the tests!

            Any explanations for these results?
            GCC heuristics in terms of generating code for "native" CPUs are not perfect. This warrants a bug report however I doubt anyone will do anything even if you file it. GCC developers require a simple test case/PoC and in this case it's quite a challenge considering you're measuring applications performance but it's the kernel code which has regressions.

            Comment


            • #7
              I'd like to see the same tests on slower cpus and especially Ryzens too.

              Comment


              • #8
                GCC 11? Does it know about Alder Lake and its Thread Whatevercrap thing at all? I am building my kernel using GCC 12 with -O3 -march=znver3 and it gives measurable boost for my typical workloads on Manjaro.

                Comment


                • #9
                  Originally posted by V1tol View Post
                  GCC 11? Does it know about Alder Lake and its Thread Whatevercrap thing at all? I am building my kernel using GCC 12 with -O3 -march=znver3 and it gives measurable boost for my typical workloads on Manjaro.
                  Test results where? Or you're talking about a placebo boost? Yeah, it's always there.

                  Comment


                  • #10
                    Originally posted by birdie View Post
                    Poor Gentoo users who have always insisted on building everything with -march=native.
                    Do all Gentoo users have the same i5-12600K CPU or how did you come to that conclusion?

                    You know that GCC with "nativ" can only optimize for one CPU core and one cache size? This CPU has different cores with different amount of cache so its gonna run bad on one or the other core.

                    Originally posted by birdie View Post
                    GCC heuristics in terms of generating code for "native" CPUs are not perfect. This warrants a bug report however I doubt anyone will do anything even if you file it. GCC developers require a simple test case/PoC and in this case it's quite a challenge considering you're measuring applications performance but it's the kernel code which has regressions.
                    Not shure what a bug report should do, I know no way to put 2 different binarys in one and than run them on the corresponding core. The easyest fix is, don't use native on such a CPU.

                    Comment

                    Working...
                    X