Software Tuning, Performance Optimization & Platform Monitoring
Discussion regarding monitoring and software tuning methodologies, Performance Monitoring Unit (PMU) of Intel microprocessors, and platform updating.

Query regarding disabling Hyperthreading on Intel Westmere


I was wondering if there is any difference between disabling the hyperthreading option completely and manually forcing no hyperthreading using the numactl oprions. (--cpubind, --membind)
I was just curious that if keeping the hyperthreafing option on at times incurrs any minor overheads.

I am working on the Intel X5675 series.
0 Kudos
2 Replies
Hello Priyanka06,
This can best be answered with the dreaded "it depends".
In practice, probably the only way to know for sure which way is the best is to try each way.
If you are worried about power usage and something is keeping the "not intended to be used" cpu busy, then the cpu may not halt and you may use more slightly more energy.
But you may get lower performance due to not having the 2nd HT cpu available.

I'll try to limit the remarks to just 1) HT disabled in BIOS vs 2) trying to restrict cpu usage to just 1 of the HT cpus using numactl options.

When HT is disabled in the BIOS, some shared resources are no longer shared and are dedicated to the 1 cpu.
Which resources go from 'shared' in HT mode to 'dedicated' in non-HT mode, can vary with processor generations.
For instance, inSandy BridgeCPUs there are 4performance counters per hyper-threaded cpu whereas, when HT is disabled, there are 8 performance counters per core.

A long time ago I tried to actually see if I could measure a performance difference and I could not.

So I'd say that it depends. You may not be able to measure a performance difference.
You might be able to measure a slight power difference.
I guess it depends on what you are trying to achieve.
0 Kudos
I completely agree with Pat that I've never seen a performance advantage in disabling Intel Hyper-Threading technology on current architectures. In order words, the architects did a great job in ensuring that the shared or partitioned resources are sufficient to sustain two threads. If you would like to know the details, the complete list is given in section 2.3.9 of the Intel 64 and IA-32 Architectures Optimization Reference Manual. (Intel Xeon processor 5600 product series is based on Nehalem architecture.)
0 Kudos