Vmware Slot Size Policy

 

The guest memory size should not be set lower than the minimum recommendations of the operating system provider. The New Virtual Machine Wizard sets reasonable defaults for the memory size of a virtual machine, based on the type of the guest operating system and the amount of memory in the host computer. 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. Configuring Manual HA Slot Size:- By default, HA slot size is determined by the Virtual machine Highest CPU and memory reservation. If no reservation is specified at the VM level, default slot size of 256 MHZ for CPU and 0 MB + memory overhead for ram will be taken as slot size.

You can configure vSphere HA to tolerate a specified number of host failures. With the Host Failures Cluster Tolerates admission control policy, vSphere HA 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.

With the Host Failures Cluster Tolerates policy, vSphere HA performs admission control in the following way:

  1. 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.

  2. Determines how many slots each host in the cluster can hold.
  3. 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.

  4. 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.

Note: You can set a specific slot size for both CPU and memory in the admission control section of the vSphere HA settings in the vSphere Web Client.

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.

Advanced Runtime Info

When you select the Host Failures Cluster Tolerates admission control policy, the Advanced Runtime Info pane appears in the vSphere HA section of the cluster's Monitor tab in the vSphere Web Client. This pane displays the following information about the cluster:

  • Slot size.
  • Total slots in cluster. The sum of the slots supported by the good hosts in the cluster.
  • Used slots. The number of slots assigned to powered-on virtual machines. It can be more than the number of powered-on virtual machines if you have defined an upper bound for the slot size using the advanced options. This is because some virtual machines can take up multiple slots.
  • Available slots. The number of slots available to power on additional virtual machines in the cluster. vSphere HA reserves the required number of slots for failover. The remaining slots are available to power on new virtual machines.
  • Failover slots. The total number of slots not counting the used slots or the available slots.
  • Total number of powered on virtual machines in cluster.
  • Total number of hosts in cluster.
  • Total good hosts in cluster. The number of hosts that are connected, not in maintenance mode, and have no vSphere HA errors.

Admission Control Using Host Failures Cluster Tolerates 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.
Vmware Slot Size Policy
  1. 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.

  2. 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.

  3. 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).

vSphere HA uses admission control to ensure that sufficient resources are reserved for virtual machine recovery when a host fails.

Admission control imposes constraints on resource usage. Any action that might violate these constraints is not permitted. Actions that might be disallowed include the following examples:

Slot
  • Powering on a virtual machine
  • Migrating a virtual machine
  • Increasing the CPU or memory reservation of a virtual machine
The basis for vSphere HA admission control is how many host failures your cluster is allowed to tolerate and still guarantee failover. The host failover capacity can be set in three ways:
  • Cluster resource percentage
  • Slot policy
  • Dedicated failover hosts

Vmware Slot Size Policy Comparison

Note: vSphere HA admission control can be disabled. However, without it you have no assurance that the expected number of virtual machines can be restarted after a failure. Do not permanently disable admission control.

Regardless of the admission control option chosen, a VM resource reduction threshold also exists. You use this setting to specify the percentage of resource degradation to tolerate, but it is not available unless vSphere DRS is enabled.

The resource reduction calculation is checked for both CPU and memory. It considers a virtual machine's reserved memory and memory overload to decide whether to permit it to power on, migrate, or have reservation changes. The actual memory consumed by the virtual machine is not considered in the calculation because the memory reservation does not always correlate with the actual memory usage of the virtual machine. If the actual usage is more than reserved memory, insufficient failover capacity is available, resulting in performance degradation on failover.

Setting a performance reduction threshold enables you to specify the occurrence of a configuration issue. For example:

Vmware Slot Size Policy Chart

  • The default value is 100%, which produces no warnings.
  • If you reduce the threshold to 0%, a warning is generated when cluster usage exceeds the available capacity.
  • If you reduce the threshold to 20%, the performance reduction that can be tolerated is calculated as performance reduction = current utilization * 20%. When the current usage minus the performance reduction exceeds the available capacity, a configuration notice is issued.