fujitsu / A64FX

447 stars 33 forks source link

A64FX_PMU_Events_v1.2 The event unit that counts energy consumption is unknown #5

Closed Nakamura-Shunsuke closed 2 years ago

Nakamura-Shunsuke commented 2 years ago

I don't know the unit of the following event, so I would like you to add it to the specification. ・EA_CORE ・EA_L2 ・EA_MEMORY

walbon commented 2 years ago

I have used the perf tool to counter the usage of energy of an application, and the values are incoherent for an application with less than 1 seconds, eg. if compared with x86 spending about 172.41 Joules. ea_core : 7.364.485.371 ea_memory: 203.355.879 ea_l2: 1.749.269.542

Nakamura-Shunsuke commented 2 years ago

@mikio-hondou, Could you please respond to this Issue?

mikio-hondou commented 2 years ago

The energy consumption units are as follows:

EA_CORE 8 nJ EA_L2 32 nJ EA_MEMORY 256 nJ

Nakamura-Shunsuke commented 2 years ago

@mikio-hondou, Thank you for your reply. Could you please add this information to the specification?

walbon commented 2 years ago

The energy consumption units are as follows:

EA_CORE 8 nJ EA_L2 32 nJ EA_MEMORY 256 nJ

So, the data printed by perf should be multiplied by those values, right?

walbon commented 2 years ago

@mikio-hondou I mean, that output I had could be like this

ea_core : 58.92 J
ea_memory: 52.06 J
ea_l2: 55.98 J
mikio-hondou commented 2 years ago

The energy consumption units are as follows: EA_CORE 8 nJ EA_L2 32 nJ EA_MEMORY 256 nJ

So, the data printed by perf should be multiplied by those values, right?

Yes, you are right.

@mikio-hondou I mean, that output I had could be like this

ea_core : 58.92 J
ea_memory: 52.06 J
ea_l2: 55.98 J

The above values are correct.

Nakamura-Shunsuke commented 2 years ago

@mikio-hondou , Thank you for the updated documentation.[1]

@walbon , The units of EA_CORE and EA_L2 are different for 48 cores and 24 cores. Please be careful when measuring with 24 cores.

EA_CORE
  8 nJ for A64FX (2.2/2.0/1.8 GHz, 48 cores)
  9 nJ for A64FX (2.6 GHz, 24 cores).

EA_L2
  32 nJ for A64FX (2.2/2.0/1.8 GHz, 48 cores)
  36 nJ for A64FX (2.6 GHz, 24 cores).

[1] https://github.com/fujitsu/A64FX/blob/master/doc/A64FX_PMU_Events_v1.3.pdf

walbon commented 2 years ago

@mikio-hondou , Thank you for the updated documentation.[1]

@walbon , The units of EA_CORE and EA_L2 are different for 48 cores and 24 cores. Please be careful when measuring with 24 cores.

EA_CORE
  8 nJ for A64FX (2.2/2.0/1.8 GHz, 48 cores)
  9 nJ for A64FX (2.6 GHz, 24 cores).

EA_L2
  32 nJ for A64FX (2.2/2.0/1.8 GHz, 48 cores)
  36 nJ for A64FX (2.6 GHz, 24 cores).

[1] https://github.com/fujitsu/A64FX/blob/master/doc/A64FX_PMU_Events_v1.3.pdf

Thank you for the update. Do you know if the kernel perf has this correct counter measure?