Vsphere Ha Slot Size

Vsphere Ha Slot Size Average ratng: 7,5/10 4410 reviews

Posted on 07 Feb 2011 by Ray Heffer

If you have the VM configured with the highest memory reservation of 8192 MB (8 GB) and highest CPU reservation of 4096 MHZ. Among the other VM’s in the cluster, then the slot size for memory is 8192 MB and slot size for CPU is 4096 MHZ. VSphere 5.5 HA Slot Sizes. 2 Less than a minute. VSphere 5.5 HA Slot Sizes. View Reddit by hobbitstoisengard0 – View Source. Facebook Twitter Google+ LinkedIn.

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)

Slot

Vsphere 6.5 Ha Slot Size

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.

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’.

Can I avoid large HA slot sizes due to reservations without resorting to advanced settings? That’s the question I get almost daily. The answer used to be NO. HA uses reservations to calculate the slot size and there’s no way to tell HA to ignore them without using advanced settings pre-vSphere. So there is your answer: pre-vSphere.

With vSphere VMware introduced a percentage next to an amount of host failures. The percentage avoids the slot size issue as it does not use slots for admission control. So what does it use?

SlotSlot

When you select a specific percentage that percentage of the total amount of resources will stay unused for HA purposes. First of all VMware HA will add up all available resources to see how much it has available. Then VMware HA will calculate how much resources are currently consumed by adding up all reservations of both memory and cpu for powered on virtual machines. For those virtual machines that do not have a reservation a default of 256Mhz will be used for CPU and a default of 0MB+memory overhead will be used for Memory. (Amount of overhead per config type can be found on page 28 of the resource management guide.)

In other words:

((total amount of available resources – total reserved VM resources)/total amount of available resources)
Where total reserved VM resources include the default reservation of 256Mhz and the memory overhead of the VM.

Let’s use a diagram to make it a bit more clear:

Vsphere Ha Slot Size Chart

Total cluster resources are 24Ghz(CPU) and 96GB(MEM). This would lead to the following calculations:

((24Ghz-(2Gz+1Ghz+256Mhz+4Ghz))/24Ghz) = 69 % available
((96GB-(1,1GB+114MB+626MB+3,2GB)/96GB= 85 % available

Vsphere Ha Slot Size Chart

As you can see the amount of memory differs from the diagram. Even if a reservation has been set the amount of memory overhead is added to the reservation. For both metrics HA admission control will constantly check if the policy has been violated or not. When one of either two thresholds are reached, memory or CPU, admission control will disallow powering on any additional virtual machines. Pretty simple huh?!

Comments are closed.