Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PAPI: what does Clock reference cycles mean?

Tags:

cpu

metric

papi

i am using PAPI liberary to tune and profile my application.

I want to know what (PAPI_REF_CYC : Reference clock cycles ) means actually?

Thanks in advance,

like image 527
abdul Avatar asked Dec 23 '22 19:12

abdul


1 Answers

Some modern CPUs, including the Intel's and AMD's ones, are throttled.
This means that their clocks are not fixed but vary depending on the power management active - even if the CPU's brand frequency is X Ghz, more often than not, it is not running at that frequency.

For a couple of real example technology see the Intel Turbo boost technology/AMD Turbo core and Intel Enhanced Speedstep technology/AMD Quiet'n'Cool technology.

Since the core clock can slow down or speed up, comparing two different measures makes no sense.
Having a snippet A to run in 100 core clocks and a snippet B in 200 core clocks means that B is slower in general (it takes double the work), but not necessarily that B took more time than A since the units are different. That's where the reference clock comes into play - it is uniform.
If snippet A runs in 100 ref clocks and snippet B runs in 200 ref clocks then B really took more time than A.

Converting ref clock ticks into time (e.g. seconds) is not that easy, each processor uses a difference reference frequency, even among processor with the same brand name.

like image 119
Margaret Bloom Avatar answered Jan 19 '23 04:01

Margaret Bloom