Vsphere Ha Slot Size
Define host failover capacity by HA Slot Policy. You can also have option to choose “Slot Policy”. This is the default option prior to vSphere 6.5. Slot Size is defined as the memory and CPU resources that satisfy the reservation requirements for any powered-on virtual machines in the HA cluster. You have 2 options under Slot Policy. VSphere HA slot sizes are used to calculate the number of VMs that can be powered on in an HA cluster with “Host failures cluster tolerates” selected.The slots size is calculated based on the size of reservations on the VMs in the cluster. Slot size is comprised of two components, CPU and memory. VSphere HA calculates the CPU component by obtaining the CPU reservation of each powered-on virtual machine and selecting the largest value. If you have not specified a CPU reservation for a virtual machine, it is assigned a default value of 32MHz.
With the slot policy option, vSphere HA admission control ensures that a specified number of hosts can fail and sufficient resources remain in the cluster to fail over all the virtual machines from those hosts.
Using the slot policy, vSphere HA performs admission control in the following way:
- Calculates the slot size.
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.
- Determines how many slots each host in the cluster can hold.
- Determines the Current Failover Capacity of the cluster.
This is the number of hosts that can fail and still leave enough slots to satisfy all of the powered-on virtual machines.
- Determines whether the Current Failover Capacity is less than the Configured Failover Capacity (provided by the user).
If it is, admission control disallows the operation.
Slot Size Calculation
Slot size is comprised of two components, CPU and memory.
- vSphere HA calculates the CPU component by obtaining the CPU reservation of each powered-on virtual machine and selecting the largest value. If you have not specified a CPU reservation for a virtual machine, it is assigned a default value of 32MHz. You can change this value by using the das.vmcpuminmhz advanced option.)
- vSphere HA calculates the memory component by obtaining the memory reservation, plus memory overhead, of each powered-on virtual machine and selecting the largest value. There is no default value for the memory reservation.
If your cluster contains any virtual machines that have much larger reservations than the others, they will distort slot size calculation. To avoid this, you can specify an upper bound for the CPU or memory component of the slot size by using the das.slotcpuinmhz or das.slotmeminmb advanced options, respectively. See vSphere HA Advanced Options.
You can also determine the risk of resource fragmentation in your cluster by viewing the number of virtual machines that require multiple slots. This can be calculated in the admission control section of the vSphere HA settings in the vSphere Web Client. Virtual machines might require multiple slots if you have specified a fixed slot size or a maximum slot size using advanced options.
Using Slots to Compute the Current Failover Capacity
After the slot size is calculated, vSphere HA determines each host's CPU and memory resources that are available for virtual machines. These amounts are those contained in the host's root resource pool, not the total physical resources of the host. The resource data for a host that is used by vSphere HA can be found on the host's Summary tab on the vSphere Web Client. If all hosts in your cluster are the same, this data can be obtained by dividing the cluster-level figures by the number of hosts. Resources being used for virtualization purposes are not included. Only hosts that are connected, not in maintenance mode, and that have no vSphere HA errors are considered.
The maximum number of slots that each host can support is then determined. To do this, the host’s CPU resource amount is divided by the CPU component of the slot size and the result is rounded down. The same calculation is made for the host's memory resource amount. These two numbers are compared and the smaller number is the number of slots that the host can support.
The Current Failover Capacity is computed by determining how many hosts (starting from the largest) can fail and still leave enough slots to satisfy the requirements of all powered-on virtual machines.
Admission Control Using Slot Policy
The way that slot size is calculated and used with this admission control policy is shown in an example. Make the following assumptions about a cluster:
- The cluster is comprised of three hosts, each with a different amount of available CPU and memory resources. The first host (H1) has 9GHz of available CPU resources and 9GB of available memory, while Host 2 (H2) has 9GHz and 6GB and Host 3 (H3) has 6GHz and 6GB.
- There are five powered-on virtual machines in the cluster with differing CPU and memory requirements. VM1 needs 2GHz of CPU resources and 1GB of memory, while VM2 needs 2GHz and 1GB, VM3 needs 1GHz and 2GB, VM4 needs 1GHz and 1GB, and VM5 needs 1GHz and 1GB.
- The Host Failures Cluster Tolerates is set to one.
- Slot size is calculated by comparing both the CPU and memory requirements of the virtual machines and selecting the largest.
The largest CPU requirement (shared by VM1 and VM2) is 2GHz, while the largest memory requirement (for VM3) is 2GB. Based on this, the slot size is 2GHz CPU and 2GB memory.
- Maximum number of slots that each host can support is determined.
H1 can support four slots. H2 can support three slots (which is the smaller of 9GHz/2GHz and 6GB/2GB) and H3 can also support three slots.
- Current Failover Capacity is computed.
The largest host is H1 and if it fails, six slots remain in the cluster, which is sufficient for all five of the powered-on virtual machines. If both H1 and H2 fail, only three slots remain, which is insufficient. Therefore, the Current Failover Capacity is one.
The cluster has one available slot (the six slots on H2 and H3 minus the five used slots).
In this post I am going to cover a few advance settings in HA which you can be used in deploying complex HA solutions. You may or may not be using these advance value in your environment but sometimes you have to use these values depending upon how your virtualization infrastructure is laid.
1: das.isolationaddress: – By default the IP address used to check host isolation is the default gateway of the VMkernel port on the host. You can add more IP addresses for the host to use during an isolation check. A total of 10 addresses can be used (0-9).
For setting up this value Select Cluster > Edit Settings > vSphere HA > Advanced Options
2: das.usedefaultisolationaddress:– this option has 2 values: True or False. When set to false a host will NOT use the default gateway as an isolation address. This may be useful when the default gateway of your host is an unpingable address, or a virtual machine, such as a virtual firewall
3: das.isolationShutdownTimeout:– use this option to specify the amount of time (in seconds) it will wait for a guest shutdown process that was initiating by invoking the isolation response, before HA will forcefully power off a virtual machine.
4: das.heartbeatDsPerHost:— set this to the number heartbeat datastores you want to use. If you have a need to configure more than two heartbeat datastores per host you can used this advanced setting. The value range of this setting is 2-5.
Create a custom slot size configuration
By default HA will take the largest CPU and memory reservation of virtual machines in a cluster to determine Slot size for the cluster/hosts. But we can force HA to use user defined value of CPU and memory to calculate slot size. There are two advanced settings that you can configure in order to create a custom slot size; one for CPU and one for memory
das.slotCpuInMHz : The value of CPU slot size in MHz.
das.slotMemInMB : Value of memory slot size in MB.
Vsphere Ha Slot Size Chart
These advanced setting “das.slotCpuInMHz “and “das.slotMemInMB” allow you to specify an upper boundary for your slot size. If you have large reservations set on only a few VM’s it can cause setting large slot size and will waste resources in your cluster as most of your VM’s will be running without any reservation.
For e.g: When one of your VMs has an 8GB reservation this setting can be used to define for instance an upper boundary of 1 GB to avoid resource wastage and an overly conservative slot size.
Vsphere Ha Slot Size Calculation
Important Note: If the highest CPU and memory reservation is below the value as specified in advance settings, then HA will take the value which is minimum.
5 das.ignoreinsufficienthbdatastore:– Disables configuration issues created if the host does not have sufficient heartbeat datastores for vSphere HA. Default value is false.
6: das.vmCpuMinMHz:– Min amount of CPU that is guaranteed to a VM when that VM is failed over (restarted) after a host failure. If CPU reservation is set on a VM then this value wont work for that VM, but will work for those VM’s which have 0 MHz reservation set.
Vsphere Ha Slot Size Chart
7 :das.vmMemoryMinMB:- Min amount of memory that is guaranteed to a VM when that VM is failed over (restarted) after a host failure. If Memory reservation is set on a VM then this value wont work for that VM, but will work for those VM’s which have 0 MB reservation set.
Vsphere 6.5 Ha Slot Size
The above 2 values are used with “Percentage Based Admission Control”