Configure virtual machines to use hyper-threading with NUMA in VMware ESXi
search cancel

Configure virtual machines to use hyper-threading with NUMA in VMware ESXi

book

Article ID: 326180

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

Virtual machines (VMs) running on VMware ESXi may report a 1:1 ratio of cores to logical processors within the Guest Operating System (OS). This occurs even when Hyper-Threading (HT) or Simultaneous Multithreading (SMT) is enabled on the physical host. Workloads that benefit from high inter-thread communication may experience performance degradation without access to sibling threads.

Environment

  • VMware vSphere ESXi
  • Virtual Machine HW version 20 or higher (for vHT)

Cause

By default, the ESXi hypervisor abstracts physical CPU topology to provide maximum isolation. The scheduler does not expose sibling Hyper-Threads to the VM unless explicitly configured to do so. This prevents the Guest OS from scheduling tasks on logical threads of the same physical core.

Resolution

To enable SMT-like behavior where the Guest OS utilizes multiple threads per core, use one of the following methods:

  1.  Expose Virtual Hyper-Threading (vHT) — Recommended for ESXi 8.0+
    1. Upgrade the Virtual Machine to Hardware Version 20 or higher
    2. Power off the VM
    3. Navigate to Edit Settings > VM Options > Advanced
    4. Set Latency Sensitivity to High with Hyperthreading
    5. Power on the VM
  2. Configure NUMA Thread Preference (Manual Configuration)
    1. Power off the VM
    2. Navigate to Edit Settings > VM Options > Advanced > Edit Configuration
    3. Add the following parameter: numa.vcpu.preferHT = TRUE
    4. Power on the VM
  3. Host Wide Configuration
    1. Log in to the vCenter Server Client
    2. Select the Host in the vCenter Inventory
    3. Select Configure > System > Advanced System Settings
    4. Select Edit
    5. Use the filter box to search for Numa.PreferHT
    6. Change the value for Numa.PreferHT to 1
    7. Select OK to save the changes

Note: This change applies to all virtual machines running on the host and instructs the ESXi scheduler to prefer scheduling vCPUs on sibling Hyper-Threads of the same physical core.

Additional Information

For more information on virtual NUMA controls, see vSphere Resource Management Guide.