Vsphere Ha Slot Size Calculation

For a long time I have been sizing vSphere clusters for customers and I am regularly asked how I work out the overcommitment ratio and calculate the suitable percentage of cluster resources to reserve for HA.

This calculator is focused on Virtual Server clusters, for VDI solutions I recommend the VDI Calculator by @andreleibovici.

This calculator allows this to be done quickly and easily while giving advice as to the availability level recommended for the cluster based on its size.

All you need to do is enter the follow details into the Yellow fields.

1. The Number of ESXi hosts
2. The total CPU sockets per host
3. Ghz per Core
4. Physical Cores per CPU Socket (Not Hyper-threads)
5. Total RAM per host
6. Total number of VMs
7. The Desired Availability Level (N+x)

Next enter the total number of vCPUs and vRAM assigned (or expected to be) assigned to VMs in the cluster.

The calculator will then output the following:

1. Total Cluster Resources

Mar 12, 2015 VMware HA slot calculation is done by the vCenter HA service that provides the capacity of the cluster as a whole to the various agents involved. In VirtualCenter 2.x, the virtual machine with the maximum resource consumption was the one chosen as the basis of the slot calculation. HA will then automatically reserve 50% of Memory and 50% of CPU for the failover capacity. If you have a 4-host cluster and FTT=1 then it will calculate a 25% reservation. HA Slot policy used to be the default admission control policy. With vSphere 6.5, the default admission control policy is now “Cluster resource Percentage”.

This is the total Physical Cores and physical RAM in the cluster.

2. The total Cluster Ghz

Self Explanatory

3. The percentage of Cluster Resources reserved for HA

This is calculated from the availability level specified.

Note: The recommended Availability level is calculator and displayed on the same line as the “Desired Availability Level”.

4. The total available Cluster Resources

This is the total cluster resources, minus the percentage of cluster resources reserved for HA. Note: This is not how vSphere HA calculates available cluster resources. This is a method I use which is conservative and ensures performance does not degrade in the event of the configured availability level.

Finally, it calculates

5. The Overcommitment Ratio for CPU and RAM

This is represented as a ratio, so a result of “1” means no overcommitment.
A result of “4” would be a 4:1 overcommitment or 400%.

The tool then shows a “Rule of Thumb” for overcommitment levels of the vSphere cluster.

Simply modify the number of hosts, Cores per Socket and RAM per host until you have the desired overcommitment levels, then you can Print the sizing chart for your design.

This has always been a hot topic, HA and Slot sizes/Admission Control. One of the most extensive (Non-VMware) articles is by Chad Sakac aka Virtual Geek, but of course since then a couple of things has changed. Chad commented on my HA Deepdive if I could address this topic, here you go Chad.

Slot sizes

Vsphere ha slot size calculations

Lets start with the basics.

What is a slot?

A slot is a logical representation of the memory and CPU resources that satisfy the requirements for any powered-on virtual machine in the cluster.

Vmware Ha Slot Size Calculation

In other words a slot size is the worst case CPU and Memory reservation scenario in a cluster. This directly leads to the first “gotcha”:

HA uses the highest CPU reservation of any given VM and the highest memory reservation of any given VM.

If VM1 has 2GHZ and 1024GB reserved and VM2 has 1GHZ and 2048GB reserved the slot size for memory will be 2048MB+memory overhead and the slot size for CPU will be 2GHZ.

Now how does HA calculate how many slots are available per host?

Of course we need to know what the slot size for memory and CPU is first. Then we divide the total available CPU resources of a host by the CPU slot size and the total available Memory Resources of a host by the memory slot size. This leaves us with a slot size for both memory and CPU. The most restrictive number is the amount of slots for this host. If you have 25 CPU slots but only 5 memory slots the amount of available slots for this host will be 5.

As you can see this can lead to very conservative consolidation ratios. With vSphere this is something that’s configurable. If you have just one VM with a really high reservation you can set the following advanced settings to lower the slot size being used during these calculations: das.slotCpuInMHz or das.slotMemInMB. To avoid not being able to power on the VM with high reservations these VM will take up multiple slots. Keep in mind that when you are low on resources this could mean that you are not able to power-on this high reservation VM as resources are fragmented throughout the cluster instead of located on a single host.

Host Failures?

Now what happens if you set the number of allowed host failures to 1?
The host with the most slots will be taken out of the equation. If you have 8 hosts with 90 slots in total but 7 hosts each have 10 slots and one host 20 this single host will not be taken into account. Worst case scenario! In other words the 7 hosts should be able to provide enough resources for the cluster when a failure of the “20 slot” host occurs.

And of course if you set it to 2 the next host that will be taken out of the equation is the host with the second most slots and so on.

Vsphere Ha Slot Size Calculations

What more?

Vsphere Ha Slot Size Calculation Formula

One thing worth mentioning, as Chad stated with vCenter 2.5 the number of vCPUs for any given VM was also taken in to account. This led to a very conservative and restrictive admission control. This behavior has been modified with vCenter 2.5 U2, the amount of vCPUs is not taken into account.