Announcement

Collapse
No announcement yet.

Tiny Patch Gets AMD Per-Core Energy Monitoring For Linux's Perf

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

  • Tiny Patch Gets AMD Per-Core Energy Monitoring For Linux's Perf

    Phoronix: Tiny Patch Gets AMD Per-Core Energy Monitoring For Linux's Perf

    Exposed via Linux's very versatile perf subsystem has been per-package energy monitoring via the RAPL (Run-Time Average Power Limiting) counters. But AMD's counters also support per-core energy monitoring and now with a tiny kernel patch those sensors too will be exposed via perf...

    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
    Aw sweet! So this’ll work with Ryzen 3000 models, right? Not just EPYC?

    Comment


    • #3
      Doesn't make sense to me. Joule is a unit of energy. There is no time dependency.

      Comment


      • #4
        Originally posted by His dad View Post
        Doesn't make sense to me. Joule is a unit of energy. There is no time dependency.
        8.73 looks suspiciously like Watts per core. That can go as high as 20 W, but 8.73 W would be typical for an multi-core workload.

        Comment


        • #5
          Originally posted by His dad View Post
          Doesn't make sense to me. Joule is a unit of energy. There is no time dependency.
          The command as shown is accumulating energy consumption until you stop it with CRTL-C.

          Comment


          • #6
            Originally posted by His dad View Post
            Doesn't make sense to me. Joule is a unit of energy. There is no time dependency.
            This tool accumulates energy, rather than integrating for power.

            Comment


            • #7
              I'm not sure this works as intended.

              Copying the test-values from Stephane Eranian:
              Code:
              $ perf stat --per-core -a -C0-63 -I 1000 -e power/energy-cores/,power/energy-pkg/
              # time core cpus counts unit events
              1.001019203 S0-D0-C0 1 1.28 Joules power/energy-cores/
              1.001019203 S0-D0-C0 1 231.38 Joules power/energy-pkg/
              1.001019203 S0-D0-C1 1 4,294,967,130.96 Joules power/energy-cores/
              1.001019203 S0-D0-C1 1 231.38 Joules power/energy-pkg/
              1.001019203 S0-D0-C2 1 4,294,967,126.23 Joules power/energy-cores/
              1.001019203 S0-D0-C2 1 231.38 Joules power/energy-pkg/
              1.001019203 S0-D0-C3 1 4,294,967,122.50 Joules power/energy-cores/
              1.001019203 S0-D0-C3 1 231.38 Joules power/energy-pkg/
              1.001019203 S0-D0-C4 1 4,294,967,129.92 Joules power/energy-cores/
              1.001019203 S0-D0-C4 1 231.38 Joules power/energy-pkg/
              1.001019203 S0-D0-C5 1 4,294,967,121.49 Joules power/energy-cores/
              1.001019203 S0-D0-C5 1 231.39 Joules power/energy-pkg/​
              This looks like bogus values returned for the energy-cores.

              Comment


              • #8
                Originally posted by baka0815 View Post
                I'm not sure this works as intended.

                Copying the test-values from Stephane Eranian:
                Code:
                $ perf stat --per-core -a -C0-63 -I 1000 -e power/energy-cores/,power/energy-pkg/
                # time core cpus counts unit events
                
                1.001019203 S0-D0-C1 1 4,294,967,130.96 Joules power/energy-cores/
                This looks like bogus values returned for the energy-cores.
                The value I left in the quote if it didn't stand-out to you is a number many programmers would recognize

                Code:
                2^32 = 4 294 967 296
                Well... close enough to that value that it's probably related to an underflow? Like if it was 0 - 196, you'd get the quoted value, because it's unsigned range, there is no negative number supported, it wraps around to the maximum value of ~4.3 billion. If it was signed, then it goes roughly 2 billion negative to 2 billion positive range for a 32-bit integer value

                So quite likely a bug yep :P Probably helpful if you share / link them to that observation so they can fix that in time.

                Comment


                • #9
                  polarathene
                  Those were numbers reported by Stephane Eranian in the patch thread, so they already know. It also doesn't matter if it's an underflow or not, those numbers are not helpful and if it's a hardware bug, the enablement just doesn't make sense. Clamping to 0 might help, but that would mean that the cores all need no energy, which is just as wrong.

                  So it looks to me that the implementation is not ready yet.

                  Comment

                  Working...
                  X