Community
cancel
Showing results for 
Search instead for 
Did you mean: 
James_S
Employee
218 Views

How VTune calculates the port utilization

Jump to solution

Looking at the port utilization part of the summary of microarchitecture exploration results, I have some questions that would like to have anyone help clarify:

Q1: How VTune calculate the "Cycles of # Ports Utilized"? What the formula is? I can find the some of the metrics formula in the VTuneInstallationDir/config/metrics, but all the XML does not show how the "Cycles of # Ports Utilized" is calculated.

Q2: Why does it not equals to 100% by adding all the sub-metrics under "Port Utilization" such as "Cycles of 0 Ports Utilized", "Cycles of 1 Ports Utilized", "Cycles of 2 Ports Utilized", "Cycles of 3+ Ports Utilized", "FPU" in my analyzed application?

Thank you!

微信图片_20210729185402.png

 

James_S_0-1627557706846.png

 

Labels (1)
0 Kudos
1 Solution
Dmitry_R_Intel1
Employee
194 Views

The formulas depend on CPU, for example on Icelake they are following:

Ports_Utilized_0 = ( CYCLE_ACTIVITY.STALLS_TOTAL - CYCLE_ACTIVITY.STALLS_MEM_ANY ) / CLKS

Ports_Utilized_1 = EXE_ACTIVITY.1_PORTS_UTIL / CLKS

Ports_Utilized_2 = EXE_ACTIVITY.2_PORTS_UTIL / CLKS

Ports_Utilized_3m = UOPS_EXECUTED.CYCLES_GE_3 / CLKS

 

As you can see from Ports_Utilized_0 formula it tries to subtract memory related stalls - this is the main reason why these metrics do not sum up to 100%, they sum up to parent 'Port Utilization' instead. And this makes sense since we are in Core Bound sub-tree and should concentrate on execution performance issues rather than memory ones.

View solution in original post

4 Replies
Dmitry_R_Intel1
Employee
195 Views

The formulas depend on CPU, for example on Icelake they are following:

Ports_Utilized_0 = ( CYCLE_ACTIVITY.STALLS_TOTAL - CYCLE_ACTIVITY.STALLS_MEM_ANY ) / CLKS

Ports_Utilized_1 = EXE_ACTIVITY.1_PORTS_UTIL / CLKS

Ports_Utilized_2 = EXE_ACTIVITY.2_PORTS_UTIL / CLKS

Ports_Utilized_3m = UOPS_EXECUTED.CYCLES_GE_3 / CLKS

 

As you can see from Ports_Utilized_0 formula it tries to subtract memory related stalls - this is the main reason why these metrics do not sum up to 100%, they sum up to parent 'Port Utilization' instead. And this makes sense since we are in Core Bound sub-tree and should concentrate on execution performance issues rather than memory ones.

View solution in original post

AbhijeetJ_Intel
Moderator
186 Views

Hi,

Adding to the above comment

Metrics measured in Clockticks are less precise compared to the metrics measured in Pipeline Slots since they may overlap and their sum at some level does not necessarily match the parent metric value. But such metrics are still useful for identifying the dominant performance bottleneck in the code.

For more information please refer:  

https://software.intel.com/content/www/us/en/develop/documentation/vtune-help/top/reference/cpu-metr...

Regards

Abhijeet


James_S
Employee
168 Views
AbhijeetJ_Intel
Moderator
146 Views

Hi,

Thanks for the confirmation.

If you need any additional information, please submit a new question as this thread will no longer be monitored.

Regards

Abhijeet


Reply