Is my VM hyperthreaded?

clip art of 
 a double-quote character

Question

I’ve been provided a VMware ESXi VM (running Windows Server 2016 SE) with 8 logical processors, but I can’t tell whether the VM is hyperthreaded. (This matters for SQL Server.)

C:\Users\XXXXXXX>wmic CPU Get DeviceID,NumberOfCores,NumberOfLogicalProcessors
DeviceID  NumberOfCores  NumberOfLogicalProcessors
CPU0      2              2
CPU1      2              2
CPU2      2              2
CPU3      2              2

wmic says there are four CPUs each with two cores. Does fact that there are two logical processors on each core mean that HT is disabled?

asked 2020-10-18 by RonJohn


Answer

Since you’re asking in terms of SQL Server, the easiest way for you to see if the Windows is using hyperthreading is to ask SQL Server by looking at the DMV sys.dm_os_sys_info:

SELECT 
     LogicalCoreCount = cpu_count,
     PhysicalCoreCount = socket_count * cores_per_socket
FROM sys.dm_os_sys_info;

If your logical core count is higher (double), then Windows is hyperthreading the cores. Since you’re running a VM on VMware, I expect you’ll see logical and physical cores are the same. Hyperthreading might still be implemented at the virtualization layer on the host by VMware.

To see this, simply go into vCenter and look up the host.

  1. Browse to the host in the vSphere Web Client navigator.
  2. Click Configure and expand Hardware.
  3. Select Processors to view the information about the number and type of physical processors and the number of logical processors.

answered 2020-11-02 by Andy Mallon