Turning off HyperThread by BIOS or kernel?

andras.tim asked:

Is there any performance difference between these disabled HyperThread scenarios? Which is the best, and why?

  • Disable HT in BIOS
  • Use noht kernel parameter

The high-optimized parallel applications works slower with enabled HT.
Our app runs 13% faster on 4 cores than 4 cores + 4 HT.

The hardware:

  • Board: Supermicro X9SPU-F
  • CPU: Intel(R) Xeon(R) CPU E3-1275 V2

My answer:

Well, the first obvious difference is that noht doesn’t actually do anything on modern Linux systems. This kernel boot option is long obsolete, and was replaced with maxcpus=.

Setting maxcpus=m, where m is the number of physical (non-HT) cores, now accomplishes the same thing.

It’s also possible to enable or disable individual CPU cores/hyperthreads via sysfs while the system is running.

With that out of the way…

There should be no difference in performance between disabling hyperthreading in the BIOS or disabling it in the operating system.

The only real difference is, if you disable the cores/threads in the OS, then you can re-enable them again later without rebooting. You might want to do this if you run different compute jobs, some of which benefit from hyperthreading and some of which do not.

View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.