aafrashteh
Contributor
Contributor

Understanding how skew is calculated

Hello everyone, I am trying to wrap my head around vCPU skew calculations. I am referencing perf-vsphere-cpu_scheduler (VMware vSphere™ 4:

The CPU Scheduler in VMware® ESX™ 4). I understand this statement :

In ESX 4, the progress of each vCPU in a virtual machine is tracked individually and the skew is measured as the difference in progress

between the slowest vCPU and each one of the other vCPUs.

Where I'm losing it is this :

Figure 1 illustrates how the skew is measured differently in ESX 3.x and ESX 4 using the example of a 4-vCPU multi-processor virtual

machine. CPUs v0 through v3 denote four vCPUs of the virtual machine and the time goes upward. The green bars for each vCPU

represent the duration while the vCPU makes progress. Note that the vCPUs make progress at different times. This may happen when

the system is overcommitted or interrupted. The size of the bars is a multiple of unit time, T, for the sake of the explanation. The red

arrows represent the amount of skew accumulated for corresponding vCPU.

Figure 1 (a) shows that the accumulated skew for v0 and v1 is 3T while the actual difference in the guest progress is only 2T.

This is a 50 percent overestimation of the skew and may result in unnecessary co-scheduling overhead. Figure 1 (b) shows the

new implementation that tracks the difference in progress from the slowest one. Note that the skew for v3 is 2T, which is an

accurate estimation.

9894_9894.jpg

What I'm trying to understand is why the accumulated guest OS skew for v0/v1 is 2T and not 3T? I know "progress" is made if a vCPU is used or marked idle by the guest OS. ESX 2.x - 4 will NOT register skew if v0, v1, v2 make progress, and v3 is idled by the guest OS. I understand there are a lot more scheduling options for ESX4 since it tracks skew more accurately...it will try to co-schedule all CPUs to decrease skew, but will also allow a much wider scope of vCPU combinations that will either keep skew even or lower it. Example if v3 advanced too much against v0/v1

(v0, v1, v2, v3)

(v0, v1, v2)

(v0, v1, v3)

(v0, v1)

(v0, v2)

(v1, v2)

(v0)

(v1)

(v2)

Ones it can't do :

(v1, v2, v3)

(v0, v2, v3)

(v0, v3)

(v1, v3)

(v2, v3)

(v2, v3)

(v3)

Just trying to understand the skew calcs...help? Smiley Happy

0 Kudos
0 Replies