, , , , ,

VMware ESXi Performance and VM Latency Sensitivity: Normal vs High

Latency sensitivity of a virtual machine can be changed to optimize the scheduling delay for latency sensitive applications and workloads. This feature was rolled out with vSphere 5.5, and the feature is still available as of right now in vSphere 7U3o and vSphere 8.x.

As a sysadmin and/or user of vSphere… what does this really mean? Well, by definition it means that you can use the Virtual Hyperthreading (vHT) feature to configure low latency VMs and expose vHT to the guest operating systems. When you enable vHT, each guest vCPU is treated as a single hyperthread of a virtual core, essentially bypassing the CPU scheduling layer (source: Configure the Virtual Machine Latency Sensitivity (vmware.com)).

And in real life, this would apply to those applications that are time-sensitive, such as VoIP/telco, media player apps, apps that require frequent access to mouse and keyboard (input devices) and/or other applications…this provides a higher level of performance with a lower level of latency, and therefore higher application performance.

For more, here’s a great video and deeper dive on the topic: Extreme Performance Series – Latency Sensitivity Improvements in 7.0 u3 for Real Time Apps – YouTube

Before turning this performance feature on, let’s examine the requirements for High Latency Sensitivity: First, verify that the virtual machine is a minimum of hardware version 14 for vSphere v7, and hardware version 20 or later for vSphere v8. Secondly, High Latency Sensitivity requires you to set CPU and 100% memory reservation for the VM, so be sure you know the reservation requirements and your host availability. Also consider features like DRS, HA and Site Replication/SRM if you are using them, where the VM will vMotion or replicate and be mindful of the resource requirements.

So how do we configure this feature for a VM? Let’s take a closer look…

In this example I’m going to turn on latency sensitivity to high on one of my PhotonOS VM’s. I have no DRS or HA in this cluster and am not using and replication technologies.

Find the VM, go to Actions, and Edit Settings.

I’m going to first set my CPU and memory reservations. Remember these both need to be set to 100%. This PhotonOS VM has one vCPU and my host is an older T3600 with an Intel Xeon E5-2650 @ 2.00 GHz, so I’m going to reserve a full 2 GHz (actually 1995 MHz due to the actual measured clock speed/frequency of the E5-2650…see https://www.cpu-world.com/sspec/SR/SR0KQ.html) to meet the requirement, which will grant full access and reservation to one CPU core.

And for the memory, to make it easy, I’m going to simply check the “Reserve all guest memory” checkbox, for a max of 2GB assigned to this VM.

Now on to setting the latency! Under the VM Options tab, expand the Advanced setting, and simply change the dropdown from Normal to High.

Below is the definition for Normal and High latency settings, for the readers reference:

Normal = The default setting. The CPU scheduler for a VM with normal latency sensitivity can move the virtual CPUs of the VM across any physical CPU of the host, depending on the system load.

High = High Latency Sensitivity requires you to set CPU and 100% memory reservation for the VM. Scheduling of the VM is adjusted for low-latency workload requirements. Each virtual CPU is granted exclusive access to a physical core.

And that’s it, now this VM has high latency sensitivity and will hit peak VM performance!

A couple of notes here as well…you should be able to toggle latency sensitivity back to normal without affecting reservations. I did this test to verify…with this VM powered on, going back and changing the latency sensitivity back to Normal had no effect on reservations. Which makes sense…since reservations are independent of latency sensitivity (but latency is dependent on dedicated resources).

Also…so you know historically this VM has been set to High Latency, I would highly recommend using Tags, it’s helpful to keep track of system changes and it’s in the VM Summary page, see the example below:

Thanks all – comment below if this helped you out in any way!

Leave a Reply

Your email address will not be published. Required fields are marked *