HA Slot sizes – how do we get those numbers from vCenter?
Info: This is a guest post by Andy Grant. He lives and works in Canada. Andy was a real help recently when I tried to configure a Cisco switch. You can read about my switch adventures here.
This post is an extension of blog discussions around VMware vSphere HA slot sizing. 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. A question that I encounter when people try and figure out their HA slot sizing is, “how come my HA slot size calculation does not equal what vCenter tells me?”
The first time I tried to calculate the number of available slots in a cluster I got it all wrong 😕 I was using Total CPU/Memory Resources found on the Cluster Summary Tab.
In this example, I have 4 hosts, but one is in maintenance mode (so HA will not count it towards available resources) plus we must account for host-level resource consumption.
VMware vCenter 4.1 makes our life a lot easier by calculating the slot sizing for us, but how do we calculate the number of slots that vCenter is showing us?
I will walk you through the process of determining to the Available slots number shown above. This assumes all hosts are identical, otherwise you have extra work on your hands calculating different host-level reservations. This example is Memory limited but the same principle applies if you are CPU limited.
Step 1 – take your total machine memory of a host and subtract System and Service Console overhead (obviously ESXi will only have the System entry).
Step 2 – take the output of step 1 and subtract your System Resource Allocation reservations.
Step 3 – HA considers each host to have 89,932MB available, multiply this by the 3 available hosts in my cluster = 269,796 MB
Now compare that to the cluster level Resource Allocation tab. Our number of 269,796MB is pretty darn close to what is reported 😀 (0.0002% margin of error? /ducks for bad math trolls).
NOTE: Your mileage may vary here depending on what version of vSphere you are running, I have typically seen the numbers match by a close margin. I would be interested to hear from others and how they fare, please include details such as ESX/i version and build numbers.
Step 4 – now back to our slot sizes, our memory slot is 1038MB. So 269,796 MB / 1038 MB = 259.9 slots. Again, compared to the reported 258 “Total slots in cluster” we are ~0.7% margin of error here.
Step 5 – the HA configuration is set for a 1 host failure, therefore 2/3rds of 258 total slots = 172 slots (86 slots reserved for HA host failure). Of the 172 slots I am using 13,172 – 13 = 159 VOILA, we have successfully calculated our available slots.
This concept of subtracting host-level reservations goes beyond determining the available slots in a cluster. A similar misconception is to use 100% of the host-level resources for capacity planning. Not only must you subtract the host-level resource reservations as exhibited by the Total Capacity metric (provided by the Resource Allocation tab of the cluster) but you must also subtract HA level reservations (remember those 86 slots in the example above) for host failure tolerance or percentage of resources as included in the Reserved Capacity metric. That topic gets trickier because other VM reservations get included in that number. This would be a good topic for a future article.
Your comments and insight are welcome on this topic.
Update: In the provided example the hosts were running ESX 4.0U1. I get similar results using ESX 4.1U1. ESXi seems to be a slightly different beast when it comes to calculating the host reservations and requires further investigation.
Yann Bizeul says
Cool article, I needed a couple hours of research while people were first asking the question in a course (Obviously, they had no better thing to do than do the math at the megabyte :-)).
And don’t forget, too, that cluster warning are only compute based on RESERVATION, no reservation -> no warning on resource overallocation to satisfy host failure or percentage reservation.
Kayser Soze says
nice article — I guess the question is, how did HA come up with the value of the “Used Slots”
thee says
so 0 slots available is bad news then ?