0

On Intel systems, how would I measure CPU cache misses and pipeline stalls and use them in a formula to determine if hyperthreading should be on or off for my workload?

I have benchmarked and reliably get a 12% improvement with HT on but I want to gain a better theoretical framework.

Gaius
  • 2,556
  • 1
  • 24
  • 43
  • 1
    [Intel VTune](https://software.intel.com/en-us/intel-vtune-amplifier-xe) might provide the information you want. – Martin Liversage Aug 04 '17 at 07:10
  • One can never generalise on this. In case you System-under-Test [SUT] has been already carefully crafted & tuned for some indeed extreme HPC-grade processing, the HT can spoil the cache-benefits / latency-masking tricks, present in the such optimised code for mathematically-dense computations. Disable in such case. – user3666197 Aug 04 '17 at 07:16

1 Answers1

1

Hyperthreading might well have an impact on your measurements. The Problem is, that nobody outside Intel really knows the details of their implementation. To be on the safe side, I would recommend running tests with and without hyperthreading and comparing the results. If you do not have the time to do that, I would disable it.

EXIT_FAILURE
  • 278
  • 1
  • 13
  • Well, not easy to perfectly mirror the workload altogether with other non-SUT-"noise" - which may yield such test envelopes measured under an uncertainty threshold.right due to variance of such un-reproducible scheduling noise – user3666197 Aug 04 '17 at 07:12