Calculating Percentage of Cluster Resources Admission Control Policy for an unbalanced vSphere 5.x cluster

I’ve been working lately on a project for one of our customers and one of the requirements was to reuse as much hardware as possible. This led of course to a HA/DRS cluster configuration with hosts with different memory and CPU sizes. As you probably all know this will lead to an unbalanced cluster. I’ve done some research about unbalanced clusters but beside the VMware vSphere 5.1 Clustering Deepdive by Duncan Epping and Frank Denneman there wasn’t much info about this subject and how to correctly calculate the values. So, first let`s define what an unbalanced cluster is.

Hosts with different sizes of memory and processor create an unbalanced cluster. The percentage of memory and processor resources should be equal or larger than the largest host in the cluster.

Okay, now, consider the following scenario. The hosts that will be part of the new cluster without any running VMs looks like this:

  • 2 hosts with 72 GB memory and 24 GHz of CPU
  • 10 hosts with 98 GB memory and 40 GHz of CPU
  • 8 hosts with 128 GB memory and 42 GHz of CPU

As you can see, the hosts have different sizes of memory and CPU resources. If we create a new cluster with these hosts, the cluster will be unbalanced and we have to calculate the correct percentage of cluster resources that will be reserved as failover spare capacity.

First, let’s calculate the total resources available.

Note: virtualization overhead and memory/CPU reservations are not taken in to account in this calculation.

Memory

((2×72 GB)+(10×98 GB)+(8x128GB)) = 144 GB+980 GB+1024 GB = 2148 GB

CPU

((2×24 GHz)+(10×40 GHz)+(8×42 GHz)) = 48 GHz+400 GHz +336 GHz = 784 GHz

Okay, now let’s assume that the cluster will tolerate a maximum of 3 host failures. How do you calculate the correct percentage of resources that should be reserved as failover spare capacity? Well, we have to calculate how much percent every single host contributes to the total capacity of the cluster.

Memory

Host A: 72 GB of 2148 GB = (72/2148) x 100 = 3.35%

Host B: 98 GB of 2148 GB = (98/2148) x 100 = 4.56%

Host C: 128 GB of 2148 GB = (128/2148) x 100 = 5.96 %

Total: ((2×3,35%)+(10×4,57%)+(8×5,96%)) ≈ 100% (round)

CPU

Host A: 24 GHz of 784 GHz = (24/786) x 100 = 3,05%

Host B: 40 GHz of 784 GHz = (40/786) x 100 = 5.1%

Host C: 42 GHz of 784 GHz = (42/786) x 100 = 5.34%

Total: ((2×3,05%)+(10×5.1%)+(8×5,34%) ≈ 100% (round)

To make it a little bit clearer, take a look at the following picture. Thanks to Frank Denneman for letting me borrow his design of the drawings he used in one of his blog posts about this matter. :)

As stated above, the percentage of memory and processor resources should be equal or larger than the largest host in the cluster. The largest host has 5,96% memory and 5,34% CPU. To accommodate a 3 host failure the percentage of memory and CPU will be (3×5,96%) = 17,88% and (3×5,34%) = 16,02% respectively. But to be safe, I would round the number, add some extra percentage and configure the admission control policy as depicted below.

This is however not a recommended cluster configuration. I have briefly discussed this scenario with Frank Denneman at the Belgium VMUG meeting. Mixing hosts with different CPU speeds could potentially lead to performance issues on the virtual machines when moved from one host to another.

Anyway, if you or your customer chooses to implement an unbalanced cluster, I hope this example will help you calculate the correct percentage of cluster resources when building an unbalanced cluster.

Cheers!

- Marek.Z

Leave a reply...