4/10/2022

Vmware Ha Slot Size Calculations

Vmware Ha Slot Size Calculations

But I was wrong. These calculations are not based on real life numbers but on the reservations you set at the VM level. Same goes for the “Host failures the cluster tolerates” setting, the slot size is based on the reservations being used per VM. Auch, I felt a little embarrassed being wrong in this.

  • VMware vSphere 4.1 - HA Admission Control Slot Calculation. Posted on 07 Feb 2011 by Ray Heffer. VMware HA (High Availability) admission control is something I wanted to understand better so I started making notes gathered from various sources on the subject, and in particular the way slot sizes are calculated.
  • If you are not familiar with the topic, start with Duncan Epping's article HA Deepdive and review the VMware HA Admission Control section of the vSphere Availability Guide. What these documents and articles do not tell us is how this slot size translates to the Available Slots as show in the Advanced Runtime Info of vCenter 4.1.
Published on 4 Dec 2007 · Filed in Explanation · 408 words (estimated 2 minutes to read)

Most readers probably know that VMware High Availability (or VMware HA) is the feature of VMware Infrastructure 3 that allows for virtual machines (VMs) to be rebooted on another available host in the event of an unexpected host failure. In these types of scenarios, a physical host goes down unexpectedly, typically due to hardware failure, and with it go a bunch of VMs. With VMware HA, these downed VMs will reboot on a different physical server in the HA cluster, thus minimizing downtime.

I had always considered that the “failover capacity,” i.e., how the number of VMs that could be supported in an HA cluster with a failed host, was calculated by VMware HA in an intelligent fashion similar to that used by VMware Distributed Resource Scheduling (VMware DRS). In other words, VMware HA would look at the needs of the downed VM, consider what is available across the various hosts, and then place virtual workloads accordingly. Sadly, that is not the case.

This article, titled HA Failover Capacity, by a VMware technical support engineer—“VMwarewolf”—provides more detailed information on how failover capacity is actually calculated. What actually happens is that VMware HA calculates a number of “slots” based on the least amount of RAM installed in a server in the cluster divided by the most amount of RAM configured for any VM in the cluster. In the article, the example is given of a server that has 16GB with at least one VM that is configured for 2GB of memory. That would create 8 slots (16GB / 2GB = 8 slots) for VMware HA.

That in and of itself is bad enough, since not all VMs will require 2GB, but here’s where it gets worse. After calculating the number of “slots” available on the smallest server in the cluster, it then extrapolates the total number of slots in the cluster using the number from that smallest server. So if one server in the HA cluster has 16GB but the remaining three have 64GB, all four servers will be treated as having only 16GB for the purposes of calculating HA “slots”. So, instead of the three bigger servers coming up with 32 slots, they’ll show up as having 8 slots. Ouch!

Be sure to keep this in mind when creating VMware HA clusters and planning for fault tolerance.

Also, if you aren’t reading VMwarewolf’s stuff, you may want to start. He (or perhaps she?) is posting some good stuff.

Metadata and Navigation

Be social and share this post!

Related Posts

  • Troubleshooting VMware HA Isolation Response5 Oct 2007
  • ESX Server and the Native VLAN13 Nov 2007
  • Using scponly on ESX Server23 Oct 2007

Vsphere Ha Slot Size Calculation

Posted on 07 Feb 2011 by Ray Heffer

Vmware Ha Slot Size Calculations

VMware HA (High Availability) admission control is something I wanted to understand better so I started making notes gathered from various sources on the subject, and in particular the way slot sizes are calculated. Duncan Epping’s Yellow Bricks site already covers HA very well and I bow down to his knowledge on the subject, well worth checking out. Also I would strongly recommend VMware vSphere 4.1 HA and DRS Technical Deepdive by Duncan Epping and Frank Denneman which I purchased at Comcol.nl which they shipped to me in the UK in just two days.

That said, I thought I would share my own views and notes I have taken on the subject. The vSphere Availability guide states “A slot is a logical representation of memory and CPU resources. By default, it is sized to satisfy the requirements for any powered-on virtual machine in the cluster.” - In simple terms a slot can be consumed by a single virtual machine, but a virtual machine may consume more than one slot.

When you create an HA enabled cluster, the default admission control policy is set to “Host failures cluster tolerates”. It is important to understand how this works to avoid any ‘schoolboy errors’ or mis-calculations in your design.

Rule # 1: Remember this, “The hostess with the mostess” - the ESX host with the most available slots will be taken out of the equation when calculating HA admission control. If your ESX cluster has 6 hosts with 16GB memory, and one host with 32GB memory then this will be excluded from the calculation.

Calculating the Slot Size (memory and CPU)

Firstly, do any virtual machines have a reservation on the CPU or memory? If so, then the virtual machine with the largest reservation on a given host is taken into account. For virtual machines that have no reservations, the slot size is calculated with the CPU at 256Mhz and memory at the VM overhead (E.g. 123.73MB - See page 28 of vsp_41_resource_mgmt.pdf). Repeat this for the remaining virtual machines on the host (see flowchart).

Flowchart Example

Lets say that we have 10 virtual machines (1 vCPU each) and two of them have reservations as follows:

VM 1 - Has a CPU reservation of 700Mhz, and no memory reservation.VM 2 - Has a CPU reservation 500Mhz and memory reservation of 1024Mb.VM 3 to 10 - No reservations on memory or CPU. (keeping this example simple)

The slot size calculation will take the largest reservation for memory and CPU. In this example the result would be:

CPU: 700MhzMemory: 1147.73MB (1024Mb plus overhead)

Rule # 2: Remember that the biggest reservation will be used for memory and CPU. If no reservations are set, then it will use 256Mhz for the CPU and 0MB + virtual machine overhead for the memory.

Vmware Ha Slot Size Calculations Chart

Calculating the Number of Slots Available

Now we have the slot size for our ESX host, the next step is to work out how many slots we have. In order to calculate this, simply divide the CPU and memory available on the host by CPU and memory slot size. For example, using our figures above (700Mhz and 1144.73Mb), say our host has 5934 Mhz CPU available and 7126MB memory, our slot sizes will be 8 for the CPU and 6 for the memory.

5934 /700 = 87126 / 1147.73 = 6

Result: Take the smaller of the two, and our ESX host has 6 available slots. Do this for each host in the cluster and you have the total number of slots available in your cluster (minus the host with the most slots).

Rule # 3: It will always use the smallest number of slots from CPU or memory.

What Does This All Mean?

Now we understand how slots are calculated on each of our ESX hosts, it gives us a better insight when determining how your HA will be configured. Here is a simple check-list of questions you should ask yourself:

  1. Do any of my virtual machines have CPU or memory reservations set?
  2. Are all of my ESX hosts of the same specification, or do I have one or two with significantly more CPU or RAM?
  3. How many host failures do I need to tolerate?

Some possible solutions:

  1. Don’t use virtual machine reservations unless absolutely necessary, instead use resource pools with reservations as these are not used in the slot size calculation.
  2. Keep the hosts in your cluster of similar specification (same CPU and memory) otherwise it could be eliminated when calculating the number of slots to use.
  3. Do you need an HA policy based on a number of host failures? Use ‘Percentage of cluster resources reserved as failover spare capacity’.