Posted  by  admin

Vmware Ha Slot Size Calculations

Vmware Ha Slot Size Calculations

Did you know about VMware HA admission control coupled to VM reservations? To be honest I thought I knew, but recently I was pointed to some details that showed me I was wrong.

What I’m talking about is the cluster setting of “HA Admission Control” and how “Percentage of cluster resources reserved as failover spare capacity” and “Host failures the cluster tolerates” are related to the CPU and memory reservations at VM level. These settings will make sure that your HA cluster will reserve enough resources to recover from host failures, depending on how high you set the % of resources to be reserved, more host failures can be tolerated.

Where did I go wrong? Well I thought vCenter made the calculations for the HA spare capacity based on real usage, using 5min interval. 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.

Vsphere Ha Slot Size Calculation

Auch, I felt a little embarrassed being wrong in this. Especially since I normally checked on reservations of VMs being set to zero if there was no special need for a reservation. But as I started asking around to people on what they used for their VM reservations, I learned that not many were using these VM reservations and more people then I expected also had the wrong idea about this.

CalculationsSlotVmware Ha Slot Size Calculations

So, to be clear once and for all:

The values used in calculations for “Host failures the cluster tolerates” and “Percentage of cluster resources reserved as failover spare capacity” are based on the CPU and memory reservations set at VM level.

My slot size is 32Mhz/80MB. Maximum number of CPU slots I can have is 328.25. Maximum number of RAM slots 40963/80=512.0375 which defines the number of total slots as HA chooses the most restrictive number (a worst case scenario). As you can see HA shows 511 total slots in the cluster. 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. As per VMWare's Definition, '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.' If you have configured reservations at VM level, It influence the HA slot calculation.

And to proof that setting no reservations can overload your cluster, have a look at my lab environment where I have set NO reservations on any of the VMs. My three hosts have 8GB of RAM each and when you look at the current load, you can see that my current memory usage is 52%, 52% and 92% which makes a total of 15.7 GB of RAM in use of the 24GB I have in my lab. Which is 65%. Now the vSphere HA status box on the summary page of the cluster shows that I have a “Current Memory Failover Capacity” of 81%. Anyone can see that’s not right. If you’re asking why the 81% and not a full 100%, those 19% are lost on VM memory overhead. But it might be clear that I can’t power on another 81% of 24GB = 19GB of VMs and still have 25% spare HA failover capacity.

Vmware Ha Slot Size Calculations Cheat

For details on how the calculations are made, check Duncan’s VMware HA DeepDive Guide, a must read.

Vmware Ha Slot Size Calculation

Now I have two questions for you, please respond in the comments:

Vmware Ha Slot Size Calculations Formula

  • The “make me feel a little better” question: Did you know about this?
  • What is the default reservation on CPU and RAM you are using in your environment. Of course, special VMs will have different requirements, but as a ‘rule of thumb’ what is the % of reservation you set?

Update:

Vmware ha slot size calculations formula
  • Frank Denneman responded to my post on his blog: THE ADMISSION CONTROL FAMILY
  • Chris Colotti also responded to my post on his blog: Bad Idea: Disabling HA Admission Control With vCloud.
  • My colleague Menno De Liege wrote a post on how to easily change the reservation of a VM: HA Admission Control: Base VM reservation on percentage.