Why should you care about Hyper-Threading (Intel) or Simultaneous Multithreading (AMD)?

The simple answer is, because it can save you money!

If you are using expensive licenses that are licensed on a per CPU core basis, then you could save money by disabling HT / SMT.

Let’s have a look at what HT / SMT is and why we should care.

Hyper-Threading (I’ll call it just that; sorry AMD) allows you to make more efficient use of a CPU core by allowing it to run two things (threads) in parallel.

It is generally a great feature as long as you don’t have to worry about the cost of core-based licenses.

When Hyper-Threading it enabled, it looks as follows:

When Hyper-Threading it disabled, it looks as follows:

How much can I save?

In general, Hyper-Threading is not a bad feature, but let’s have a look at the financial impact of leaving it enabled when the workload requires expensive core-based licenses.

We will use SQL Server Enterprise Edition in our example.

We will use a 16 vCPU E16s v5 (16 vCPUs with HT enabled and 128GB RAM).

SQL Server Enterprise Edition costs $547.50 per two cores (that’s why you don’t want to pay for “fake” cores…) to get through Azure, so we will use this number in our example.

Let’s compare!

VM SKUHyper-Threading statusLicensing costVirtual CPU coresPhysical (“real”) CPU coresSQLite (performance) score
E16ds v5Enabled$547.50 * 8 = $4,3901688303.96
E16ds v5Disabled$547.50 * 4 = $2,190887683.72

Above we can see that when Hyper-Threading is enabled, we have to spend 100% more on SQL Server licensing costs compared to when Hyper-Threading is disabled.

Note that performance is slightly better when Hyper-Threading is enabled, but certainly not good enough to justify the huge cost increase!

Also note that this is relevant for Azure Hybrid Use Benefit (AHUB) where you are bringing your own Windows/SQL Server licenses to Azure.

How do I disable Hyper-Threading / Simultaneous Multithreading in Azure?

This is a two-step process:

1. Raise a ticket with Azure Support and ask them to whitelist the subscription (make sure you provide the subscription ID) where you want to disable Hyper-Threading (Intel) or Simultaneous Multithreading (AMD).

2. Tag the virtual machine with “platformsettings.host_environment.disablehyperthreading : true”.

Key takeaway

  • If you are hosting a workload on Azure that is using expensive core-based licensing (SQL Server is an example of this); disable Hyper-Threading / Simultaneous Multithreading to significantly lower your costs. If Hyper-Threaded cores don’t fit, you must acquit!