Re: URGENT:::HA slot size calculation: Does no. Of VCPU impact the slot size calculation? Troy Clavell Nov 11, 2010 10:53 AM ( in response to swamy ) from my under the vCPU is listed as the VM(s) with the highest vCPU count. Slot Policy Admission Control With the slot policy option vSphere HA admission from ENGL 0020 at Macquarie.
- Vsphere Ha Slot Size Calculation Calculator
- Vmware Ha Slot Size Calculation
- Vsphere Ha Slot Size Calculations
VMWare vShpere 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. Highest memory reservation and highest CPU reservation of the VM in your cluster determines the slot size for the cluster.
Here is the Example,
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. in the cluster.
If no VM level reservation is configured , Minimum CPU size of 256 MHZ and memory size of 0 MB + VM memory overhead will be considered as CPU and Memory slot size.
Calculation for Number of Slots in cluster :-
Once we got the Slot size for memory and CPU by the above method , Use the below calculation
Num of CPU Slots = Total available CPU resource of ESX or cluster / CPU Slot Size
Num of memory slots = Total available memory resource of ESX or cluster minus memory used for service console & ESX system / Memory Slot size
Let's take a Example,
I have 3 host on the cluster and 6 Virtual machine is running on the cluster and Each host capacity as follows
RAM = 50 GB per Host
CPU = 8 X 2.666 GHZ per host
Cluster RAM Resources = 50 X 3 = 150 GB - Memory for service console and system = 143 GB
Cluster CPU resources = 8 X 2.6 X 3 = 63 GHZ (63000 MHZ) of total CPU capacity in the cluster - CPU Capacity used by the ESX System = 60384 MHZ
I don't have any memory or CPU reservation in my cluster, So, the default CPU slot size 256 MHZ and one of my Virtual machine is assigned with 8 vcpu and its memory overhead is 344.98 MB (which is the highest overhead among my 6 virtual machines in the cluster)
Let's calculate the num of CPU & Memory slots
Num of CPU Slots = Total available CPU resource of cluster / CPUSlot size in MHZ
No of CPU Slots = 60384 MHZ / 256 MHZ = 235.875 Approx
Num of Memory Slots = Total available Memory resource of cluster / memory Slot Size in MB
Num of Memory Slots = 146432 / 345 = 424 Approx
The most restrictive number among CPU and Memory slots determines the amount of slots for this cluster. We have 235 slots available for CPU and 424 Slots available for Memory. So the most restrictive number is 235.
So, Total number of slots for my cluster is 235 Approx. Please find the below snapshot
Please refer my blog post on Understanding Total Slots, Used Slots & Available slots in VMware HA Slot to understand Total Slots, Used Slots & Available slots
I hope you understand the post.Thanks For Reading !!!!!
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. 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.
Vsphere Ha Slot Size Calculation Calculator
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
Vmware Ha Slot Size Calculation
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.
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.
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.
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.
T slot snow anchor bolt. 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:
Vsphere Ha Slot Size Calculations
- Do any of my virtual machines have CPU or memory reservations set?
- Are all of my ESX hosts of the same specification, or do I have one or two with significantly more CPU or RAM?
- How many host failures do I need to tolerate?
Some possible solutions:
- 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.
- 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.
- Do you need an HA policy based on a number of host failures? Use ‘Percentage of cluster resources reserved as failover spare capacity'.