Feature request: Highlighting of suboptimally placed threads on SMT CPUs
Example case 1: Running a benchmark pinned to a CPU core results in IPC=1.62:
$ numactl -C 0 perf stat stress-ng --cpu 1
1.62 insn per cycle
Example case 2: Running two instances of the benchmark pinned to two distinct CPU cores also results in IPC=1.62:
$ numactl -C 0 perf stat stress-ng --cpu 1 & numactl -C 1 perf stat stress-ng --cpu 1; fg
1.62 insn per cycle
1.62 insn per cycle
Example case 3: But running two instances of the benchmark pinned to the two distinct SMT threads provided by a single physical CPU core results in IPC=1.25:
$ numactl -C 0 perf stat stress-ng --cpu 1 & numactl -C 8 perf stat stress-ng --cpu 1; fg
1.23 insn per cycle
1.25 insn per cycle
Base idea: The cpugraph bars area can be used to paint the bars using a different color if suboptimal allocation of threads to logical CPUs is detected (case 3).
Suggested rendering for case 2:
Suggested rendering for case 3:
For an overview of the SMT topic see for example http://www.anandtech.com/show/16261/investigating-performance-of-multithreading-on-zen-3-and-amd-ryzen-5000
Edited by Ghost User