Measure uncore frequency on my Skylake CPU

Measure uncore frequency on my Skylake CPU


Is it possible to measure the uncore frequency on my Skylake i7-6700HQ CPU? None of the conventional tools like <pre>/proc/cpuinfo, turbostat --debug, cpupower, i7z, </pre> etc seem to show it...

9 posts / 0 new

I don't see a table of uncore performance monitoring events for the Skylake Core i7 processors in Chapter 19 of Volume 3 of the Intel Architectures SW Developer's Manual, but VTune does define a few events for that processor.   I am not very familiar with this platform, but it might be possible to define an uncore event or combination of events that increments every uncore cycle.  For example, count cycles in which a buffer is empty and count cycles in which a buffer is not empty and add the two values.  This might not be a useful event for performance monitoring, but if it is possible it would give you a count of uncore clocks that you could divide by wall time to get the average uncore frequency.
 

"Dr. Bandwidth"

The Skylake Core i7 processor provides the Uncore clock through a fixed-purpose counter of the UBOX.

The counter control register is MSR 0x394 while the counter register is MSR 0x395 (44 bits width). Set bits 20 and 22 in 0x394 starts the counting. 22 is the enable/disable bit while bit 20 enables the propagation of overflows to MSR_UNC_PERF_GLOBAL_STATUS (0xe2). There is no clear documentation for the Skylake Uncore in Intel's SDM but all above registers are listed in the MSR section (35.15) for Intel Skylake. This feature is implemented and tested in LIKWID.


any similar method to measure the uncore frequency in Skylake XEON CPUs?

-- edited --

figured it out:

sudo wrmsr 0x700 0x2000000000000000 – Unfreeze all uncore performance monitors

sudo wrmsr 0x703 0x400000– enable PMON_FIXED counter 

 

diff in counter results in uncore tics in 1sec:

sudo rdmsr 0x704 -d;sleep 1;sudo rdmsr 0x704 -d


Here are the Skylake Uncore measurements I'm providing in CoreFreq


Where should I be looking, for the live uncore speeds? One shot shows "Uncore: 133" and another shows "Uncore: 12890807". Even without knowing the units, it's hard to believe those are both right.


You might try MSR 0x620.   It is not documented on all platforms, but it shows up several times in Volume 4 of the SWDM.

It is a good idea to save the value before fiddling with it because there is no way to recover the original values without resetting the system.  (You can, of course, re-program the original values, but only if you remember them!)

"Dr. Bandwidth"

Quote:

McCalpin, John (Blackbelt) wrote:

You might try MSR 0x620.   It is not documented on all platforms, but it shows up several times in Volume 4 of the SWDM.

It is a good idea to save the value before fiddling with it because there is no way to recover the original values without resetting the system.  (You can, of course, re-program the original values, but only if you remember them!)

 

Thanks Dr. McCalpin. I probably should have been clearer that I was replying to user CyrIng specifically - he provided some screenshots of this tool, which I've tried before but I was trying to understand where I should look for the uncore frequency, since there is a lot going on in those shots.

 

I have had some luck accessing the uncore ubox on my SKL machine using perf on Linux, but I sometimes get unreliable results. There may be a bug in perf e.g., relating to saving the counters across sleep states. I guess this MSR 0x620 represents another possible vector for getting this value, maybe I'll try it out at some point.


You can get the current Uncore frequency from MSR 0x621. It is not officially documented in SDM or such but it was published by in the book Energy Efficient Servers: Blueprints for Data Center Optimization . The authors are Intel engineers.

 

Leave a Comment

Please sign in to add a comment. Not a member? Join today