VMware Cloud Community
woodycollins
Contributor
Contributor

Understanding Reservations

I am trying to better understand how reservations can be used as well as how they will affect performance on a host / cluster.  Here is the scenario.  We have 5 ESX 4.1 hosts configured in a cluster.  Each host has 2 sockets with 8 cores per socket giving a total of 16 cores per host.  Thats a total of 80 cores across the cluster.  Each core is 2.4GHz in speed creating a total of 191GHz across the entire cluster.

Lets say we have 100 total VM and without going into major detail lets assume all VM's are created equal on the cluster.  I go and create 4 resource groups dividing the 100 VM's into 25 VM's / resource group based on what they do.  Can someone explain what would happen if I have no restrictions on any of the resource groups and reserve 1000MHz (1-GHz) for resource group 1?  If the VM's for resource group 1 is running across multiple hosts, does it divide the reservation across the hosts?  Or does it garuntee 1000MHz for any one of the VM's in the resource group regardless of host at any one given time?  Or is there some other way I am not seeing?

Reply
0 Kudos
8 Replies
AureusStone
Expert
Expert

Yes reserving will guarantee that resource pool 1 will get 1ghz of processing power.  This will reserve 1GHz shared across the pool, the other pools can not use the reserved capacity.

Reservations should not be used unless you have a good reason to do so.  By reserving 1ghz of processing power you are blocking the other pools from accessing those resources.  1GHz wouldn't make a difference, but if you decided to reserve 47GHz for each pool, then each pool will only be allowed to use a max of 25% of the resources, no matter what the utilisation of the cluster is.

In the case where you have a cluster where every VM is as important as any other VM, resources pools should not be used.

Reply
0 Kudos
woodycollins
Contributor
Contributor

Thank you for the response.  The fact that your reserving the amount of resources and removing the ability of the other resource groups from using those resources I understand.  I was more interested in finding out how resources for a resource group are reserved across multiple hosts in a cluster.  And in doing so how those resources in the group are given to the VM's in the resource group containing the reservations.

So in our example.  Of the 25 VM's in resource group 1.  If the machines are spread across the 5 hosts.  How would the reservations be calculated?  Does 1 machine on a single host get all 1000MHz?  Or does it only get 200MHz?

edit:

We may have a good use case scenario for them in our environment but I want to better understand how things work first.

Reply
0 Kudos
AureusStone
Expert
Expert

The resources will be divided fairly between the pool.

If you click on your resource pool and go to the resource allocation tab you can see what percentage of the reservation each vm will get.  VMs with more vCPUs will be allocated more shares.  So a VM with 1 vCPU will get 1000 cpu shares and the VM 2 vCPU will get 2000 shares, with the default settings.

So in your example, if every VM had the same amount of vCPU and the resource allocation has not been modified then each VM will be guaranteed 40MHz (1000Mhz / 25 VMs).

Edit: Resource pools depend upon DRS.  Resource pools care about cluster utilisation not host utilisation as if you have resource pools you have DRS.

Reply
0 Kudos
woodycollins
Contributor
Contributor

Lets change the scenario slightly then.  Say in the environment there are now 500 VM in the posting above split evenly split across the 4 resource groups.  There is a total processor usage of 40% across the cluster.  How ever there now is CPU contention since there is no longer enough processor cores to go around. Will the reservations make any difference in this new scenario?

Reply
0 Kudos
AureusStone
Expert
Expert

So in this situation your issue is not enough cores and thus cpu ready time.  DRS does not AFAIK take in to account the ratio between vCPUs and pCPUs.  DRS will kick in and allocate VMs CPU time based on shares when CPU utilisation is high.  This situation can be avoided by proper capacity management.

At 40% CPU utilisation across the cluster, under the assumption that all guests are running at the same utilisation, each resource pool will be using less resources then the reservation.

Reply
0 Kudos
woodycollins
Contributor
Contributor

Sadly, the environment I was tasked with managing appears to be improperly calculated for capacity planning.  There is nothing much I can do about that at this point except show that the capacity is all wrong and make suggestions on how to resolve the issue.  I am just looking for a way in the short term to improve performance for a specific set of machines in a cluster when the over all cluster utilization is low.

Any idea's?  Share adjustment's maybe?

Reply
0 Kudos
AureusStone
Expert
Expert

Share adjustment shouldn't help.  At only 40% utilisation, shares do nothing.

Out of curorisity what is the clusters vCPU to pCPU ratio and what kind of ready time % are you seeing?  Is it above 10%

Short term fixes that I can think of..

* Place important VMs on to a host and manually vMotion off VMs until you have a good ready time %

* Find VMs which have more vCPU then required and downgrade them.  Due to your contention issues this will actually improve performance.

* Find VMs which are no longer in use and decommision.

Reply
0 Kudos
woodycollins
Contributor
Contributor

I am seeing %RDY times vary from as low as 0.2% up to 44%.  I haven't investigated the number of vCPU to VM's just yet completly but the higher %RDY time VM's I am expecting to have more than a single vCPU (though looking at a quick pull from a powercli script I ran this may not necessarilly be the case).  I also have started the 2 last idea's you posted.  The vMotioning idea I have not suggested as there is currently not enough hosts containing enough cores to handle the capacity for the machines I am looking to improve performance on. Smiley Sad

edit:

One other thing, does anyone know of an simple calculator to estimate the number of virtual machines that can expect to run a given host after defining the host spec's?  I've seen some that calculate what the host size should be based on guest specifications but it would be helpfull to show host to guest estimates.

Reply
0 Kudos