Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 251579

Re: CPU Latency

$
0
0

There are 4 CPU states. At least according to the vSphere 5.1 CPU scheduler white paper :-)

 

Below is my understanding. Do correct me if I'm wrong.

 

The 4 states above add to 100%.
100% = %RUN + %READY + %CSTP + %WAIT

 

When first added, a VM is either in RUN or in READY state depending on the availability of a physical CPU at the ESX layer.

 

A VM in READY state is dispatched by the vmkernel CPU scheduler and enters RUN state. At RUN state, the VM is being served by the hypervisor, and can do what it is expected to do. CPU Ready & CPU Latency are similar
Latency: % of time the VM is unable to run because it is contending for access to the physical CPU.
Ready: % of time that the VM was ready, but could not get scheduled to run on the physical CPU. [e1: this is the total of all VMs in the ESX]
So it seems like Ready is after Latency. Latency will go up first, as the preferred NUMA core might not be available, then Ready will follow when there is no core available at all.

 


It can be later de-scheduled by vmkernel, and enters either READY or COSTOP state. Co-Stop happens if the VM has >1 vCPU, and one of them is waiting for the other. The waiting happens because ESXi does not have enough physical CPU to serve it. This is why you need to right size the VM. %RDY also includes %MLMTD, which is VM was ready to execute, but has not been scheduled for CPU time because of Limit. You should not use Limit.

 

The co-stopped VM is co-started later and enters READY state, where is ready to run. So Ready time does not include Co-Stop time. You need to measure both.

 

A VM in RUN state might enter WAIT state. Normally it is because it is waiting for a resource and is later woken up once the resource becomes available. This is normally IO work, e.g. waiting for a disk command to come back from the array.

 

When a VM is idle, not doing any work, it enters WAIT_IDLE, a special type of WAIT state. So it is not actually not waiting for anything. An idle world is woken up whenever it is interrupted.

 

WAIT also includes %SWPWT, which is CPU is waiting for VMKernel swapping memory


Viewing all articles
Browse latest Browse all 251579

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>