VMware Cloud Community
TheVMinator
Expert
Expert

Determining how cluster resource pool configuration is implemented on individual ESXi hosts

I have an ESXi cluster with 4 hosts.  There are 4 resource pools.  Each resource pool has 10 VMs.  The VMs are spread among the ESXi hosts.

Suddenly one ESXi host experiences contention for CPU resources. I want to calculate how many shares each vm gets on this host during contention.

Is there a guide, online calculator or step-by-step process for calculating how the share values I configured at the cluster level are getting implemented on an individual ESXi host?

I want to plug in the share values assigned to each resource pool, how many VMs from each resource pool are on a single ESXi host, and then calculate how many shares each VM would get just on that host during contention, assuming only that host is experiencing contention.

Reply
0 Kudos
8 Replies
CRad14
Hot Shot
Hot Shot

I don't think I can 100% answer this, but here are some thoughts that may or may not be correct.

When hosts are entered into a cluster, their resources become cluster resources, or shared resources. At this point, I "think" any issue a host might be having with resources becomes a cluster issue. I think it is possible that when this happens, shares start becoming implemented at a cluster level.

Along that line of thought, if there is contention, shares cannot be calculated on the host level and should be calculated on the cluster level.

Atleast, those are some thoughts, let me know if you are able to find an "official" answer.

Conrad www.vnoob.com | @vNoob | If I or anyone else is helpful to you make sure you mark their posts as such! 🙂
Reply
0 Kudos
weinstein5
Immortal
Immortal

It will depend on the type of cluster this is - if it is a DRS cluster with the default configuration then the VMs will moved so that the host is no longer under contention - if it is an HA cluster it will be a more tricky - first remember shares are tool to allow you to prioritize the dlivery of resources if there is contention - to start at the base level - say you have a group of 3 VMs all with equal shares (1000) - when there is contention for a resource each VM will get an equal amount or 1/3 (1000 out of a poll of 3000) of the resource - lets say VM1 critical and what to make sure it receives more of a resource when there is contention so you assign its shares double the shares assigned to each of the other 2 VMs - so when there is contention now VM1 will get 1/2 of the resource (2000 out of a pool of 4000) while the other two VMs each will get 1/4 (1000 out of a pool of 4000) - This is true whether they are VMs or resource pools.

So it is my understanding since only the resources from that host are available - the resources will be first divided up based on the shares assigned to the resource pools and than from that pool of resources they will be divided up between the VMs based on their respective shares.

I have also moved this to a more appropriate forum

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful
Reply
0 Kudos
TheVMinator
Expert
Expert

The share configurations are most certainly done at the cluster level and not at the individual ESXi host level.  However the software that actually enforces what happens during contention is the individual ESXi hypervisor. It most definitely does it based on cluster-level configurations.  But those cluster-level configurations have to be translated down to decisions that each ESXi hypervisor has to make during contention.

Reply
0 Kudos
john23
Commander
Commander

Completely agree, Resource always calculate on cluster level only, and then only slot definition come up.

HA and Slot sizes - Yellow Bricks

Thanks -A Read my blogs: www.openwriteup.com
Reply
0 Kudos
CRad14
Hot Shot
Hot Shot

I think the way to translate it down, might just be as simple as pretending the other hosts(and subsequently vms on those hosts) didn't exist for the calculation.

Conrad www.vnoob.com | @vNoob | If I or anyone else is helpful to you make sure you mark their posts as such! 🙂
Reply
0 Kudos
TheVMinator
Expert
Expert

RP1 - 4000 shares totalRP2 - 4000 shares total
vm1vm5
vm2vm6
vm3vm7
vm4vm8

Let me try to simplify my example to explain. There are 2 resource pools with 4 vms each.   In this scenario, DRS is not enabled, so ESXi will not move VMs to another host during contention.

ESXi host 1 has 3 vms on it - vm1, vm5 and vm6.  It has 12GHz of total CPU resources available. Suddenly CPU resources on ESXi host1 come into contention.

On ESXi host1, how many shares do vm1, vm5 and vm6 get respectively? 

It could do it two ways:

1. It could split its resources first equally between resource pool 1 and resource pool 2, giving each of them half the shares available to it.  Resource pool 1 gets 6Ghz, Resource Pool 2 gets 6Ghz.

In that scenario, vm1 would get 6Ghz, vm5 would get 3Ghz, and vm6 would get 3Ghz.

2.  Or it could calculate it this way:

-the two resource pools have 4000 shares each.

-Each resource pool has 4 vms

-therefore each vm in the cluster gets 1000 shares.

-Therefore since each of the 3 vms on this host gets 1000 shares, CPU resources would be 4GHz to each of the 3 vms.

which method does ESXi use?

Reply
0 Kudos
CRad14
Hot Shot
Hot Shot

I believe Method 1... but I am in no way an official answer.

Conrad www.vnoob.com | @vNoob | If I or anyone else is helpful to you make sure you mark their posts as such! 🙂
Reply
0 Kudos
TheVMinator
Expert
Expert

So I'm stumped then - don't know official VMware statement on how they calculate it then...

Reply
0 Kudos