Analyzers
Talk to fellow users of Intel Analyzer tools (Intel VTune™ Profiler, Intel Advisor)
4975 Discussions

How VTune calculates the port utilization

James_S
Employee
1,405 Views

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
1,381 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

0 Kudos
4 Replies
Dmitry_R_Intel1
Employee
1,382 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.

0 Kudos
AbhijeetJ_Intel
Moderator
1,373 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-metrics-reference/clockticks-vs-pipeline-slots-based-metrics.html

Regards

Abhijeet


0 Kudos
James_S
Employee
1,355 Views
0 Kudos
AbhijeetJ_Intel
Moderator
1,333 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


0 Kudos
Reply