Recently I have experienced a network latency on a particular Windows 2012 R2 VM. Only that particular VM has network latency even while pinging within the Virtual environment. I have pinged that Windows 2012 server from a jump (another Windows) server and it is evident, usually the latency will be <1ms but I got 300 to 1500ms. That was pretty high when pinging within the Virtual network. Because of this latency, I was not even able to RDP or provide my inputs.
What are the contributing factors for this issue ?
- Allocating too much CPU (more than the ESXi host can provide) to a VM (Windows) could cause this issue. This is called Over commiting.
- Power Plan in Windows
What was the config of the problematic VM?
I have provided 16 core to the VM while the CPU in the ESXi has 16 core CPU.
I have powered off the Windows 2012 R2 VM from the console and reduced the CPU. Please see below bullets for more details.
- I have reduced the CPU from 16 cores total to 4 cores and the issue resolved.
- I have also changed the Power Plan to best performance.
Consider the below example (From VMware. Link provided below)
- An ESXi 5.0 host with a hyper-threading enabled quad-core CPU, resulting in 4 physical and 8 logical CPUs
- A Windows 2008 R2 virtual machine with 4 virtual CPUs
- Three Windows 2003 virtual machines with 2 virtual CPUs each
In this configuration, the ESXi host exposes 8 logical CPUs as 10 virtual CPUs to the virtual machines. In other words, the ESXi host is overcommitted. Depending on the utilization of the virtual machines, the ESXi host will not be able to provide all virtual machines with the requested CPU time, thus the performance of the virtual machines will be as expected. However, if the load on multiple virtual machines increases, the ESXi host has to decide which virtual machine will be served first with the currently available CPU time. It is important to note that the ESXi host will serve multi-core virtual machines only when it is able to serve all the virtual CPUs from the particular virtual machine at once. Otherwise a virtual machine with a lower number of virtual CPUs will be served first. Although this is how the CPU scheduler is supposed to work, it can also lead to situations where certain virtual machines have to wait for an unreasonable amount of time for the requested CPU time. In such cases you can observe a degraded overall performance and increased response times.
Poor network performance or high network latency on Windows virtual machines (2008925)