Should You Disable Hyper-Threading?

Symmetric Multi-Threading (SMT), also known as Hyper-Threading, exposes two logical CPU cores for every physical CPU core. It does this by sharing computational units of the physical CPU core between the two virtual CPU cores.

If neither of the paired cores needs to use the same CPU resources, then they can run simultaneously. This allows for more efficient use of computational resources on the CPU die since two distinct software threads have the opportunity to utilize them at any given time. Otherwise, those hardware resources might be sitting idle and unused.

Should I Disable Hyper-Threading?

For performance, generally NO. For security, given recent MDS (Microarchitectural Data Sampling) side-channel attacks, MAYBE.

Performance, Then and Now

When Hyper-Threading was first introduced, its logical cores were little more than an add-on, providing as little as 10% of the performance of a real CPU core. Further complicating matters, the Windows CPU scheduler was not fully aware that it needed to first utilize real CPU cores before loading up Hyper-Threaded logical CPU cores.

However, in the past several years, both Intel and AMD have changed their architectures, and the Windows CPU scheduler is very aware that it needs to prioritize thread scheduling to real CPU cores first. You can observe this in the way it interleaves thread utilization across logical CPU cores.

Still, sometimes it is preferred to disable Hyper-Threading to ensure consistent application performance, particularly in real-time applications.

You can either disable Hyper-Threading at the UEFI (BIOS) level, or dynamically, per-process, with Process Lasso’s Hyper-Threaded Core Avoidance. The latter lets you restrict use of of non-physical cores to only applications that need real-time performance, without disabling Hyper-Threading entirely, and for some older AMD architectures (e.g. Bulldozer) it is the only way to completely disable use of paired cores.

To aid you in determining the actual performance capabilities of your logical CPU cores, you can use our nifty ThreadRacer tool. It will allow you to compare the relative performance of threads running on specific CPU cores.

When Hyper-Threading/SMT is enabled, you can consider every other CPU core as physical, and the interlaced ones as logical. For instance, threads 1 and 3 would be physical cores, while cores 2 and 4 would be logical cores attached to physical cores 1 and 3, respectively.

Each logical CPU core pair (e.g. threads 1 and 2) share computational units. That is the nature of Hyper-Threading. Thus, loading up threads 1 and 2 will offer inferior performance to loading up the two distinct physical cores of 1 and 3.

Intel i7-6650 Results:

ThreadRacer on an Intel i7-6650U

ThreadRacer on an Intel i7-6650U

AMD Fx 9370 Results

ThreadRacer on an AMD FX-9370

Security in the post-Meltdown World

UPDATE MAY 2019: The recent revelation of MDS (Microarchitectural Data Sampling) side-channel attacks adds a new wrinkle in the decision to disable Hyper-Threading or not. Presently, there is no way to fully mitigate MDS attacks while Hyper-Threading remains enabled. However, this is generally not a big enough concern for consumer systems to warrant the potentially massive decrease in performance. However, if you are routinely running untrusted code in a high security environment, you should definitely consider disable Hyper-Threading.