본문 바로가기

카테고리 없음

Vmware Slot Size



VMware slot sizes are an important topic if you’re concerned with how many ESXi hosts are required to run your environment.

What is a Slot?

Find Your Slot Size: VMware Cluster Summary - Advanced Runtime Info VMware Advanced Runtime Info: Slot sizes So you can see above, worst case scenario, one slot size is 2507Mhz, 4256 MB. Available slots = Total slot – Used slots i,e Available slots = 234 – 6 = 228. It should come as 228 as available slots but why Available slots is 150 in the above snapshot. Is that wrong or VMware did something wrong in HA slot calculation? Slot Size Calculation Slot size is comprised of two components, CPU and memory. VMware HA calculates the CPU component by obtaining the CPU reservation of each powered-on virtual machine and selecting the largest value. 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.

To begin this post, we need to understand what a slot is. A slot is the minimum amount of CPU and memory resources required for a single VM in an ESXi cluster. Slot size is an important concept because it affects admission control.
A VMware ESXi cluster needs a way to determine how many resources need to be available in the event of a host failure. This slot calculation gives the cluster a way to reserve the right amount of resources.

How are Slots Sized?

Slot
The slot has two parts, the CPU component and the memory component. Each of them has its own calculation. If there are no virtual machine resource reservations in the cluster, then the slot size (for ESXi 5 at least) is 32 Mhz for CPU and 0 MBs + overhead for memory. (I’ve used 80 MBs as my memory overhead in the examples)
In the example below we have 2 ESXi hosts that have the same amount of resources available for virtual machines. There are different sized VMs, but none of them have a reservation. Doing a quick calculation we can determine that 384 slots are available on each host.
Memory Component: 49 GBs / 4024 MBs = 627 slots

We take the lower value between the CPU slot size and the memory slot size to determine the number of virtual machines that can be started up under admission control. So therefore we could safely start 384 machines on these ESXi hosts, have one fail, and have the other host start all of them.
(I should mention that it’s unlikely that you could get 384 vms on one of these hosts. That would be a great consolidation ratio.)
Problem Scenario
What if you have a single large VM with a reservation, but the rest of the virtual machines are relatively small.
Let’s look at the same environment, but this time let’s make the larger VM have a reservation on it.
Memory Component: 49 GBs / 4024 MBs = 12 slots
Admission control is going to tell us that only 6 slots are available on host B, so it will only allow 6 VMs on host A to be powered on. Since I’m using a simplistic diagram with only two hosts, we know that these VMs will still fit on the host but since we use the largest slot size to determine how much we can fail over admission control will stop us from powering on VMs.
Option 1 – Don’t use reservations unless their is a good reason to do so.
Option 2 – We can manually configure the slot size on the cluster.
Navigate to the cluster settings and go to the HA Section, Click Edit and you’ll have the option of modifying the slot size. Note that if you do this, some of your VMs will require multiple slots to run. For instance the large VM we used in our example might take more than 1 slot depending on what size you make it. The button below the slot size configuration may help you determine how many VMs will be affected by this change.
If you’re curious about what the slot size is on your system, look at your cluster summary. There will be an item listed for slot size.

If you’re in a situation where you think you need to add extra ESXi hosts to your cluster because you can’t power on virtual machines without exceeding your admission control rules, take a look at your slot sizes first. It may save you some money on a host you don’t really need.

By Duncan Epping, Principal Architect.

On the VMTN forum today someone asked how it was possible that the “used slots” exceeded the “total slots”. This is what their environment showed in vCenter:

HA Advanced Runtime Info:
Slot size 4000Mhz
4 vCPUs,
4232MB
Total Slots in Cluster 16
Used Slots 66
Available Slots 0
Total Powered on vms in Cluster 66
Total Hosts in cluster 2
Total good host 2

Vmware

You can imagine this person was very surprised to see this. How can you have 66 slots used and only 16 total slots available in your cluster? There are two possible explanations:

  1. Admission Control is disabled
  2. A reservation was set on a virtual machine after all virtual machines were powered on, skewing the numbers

Let’s tackle number 1 first. If you disable admission control the vSphere UI will still show the slot size and the number of slots etc, it just won’t do anything with it…

Vmware Cluster Slot Size Calculation

With regards to the second explanation it might be easier to give an example:

Vmware Memory Slot Size

Just imagine you have 2 hosts and HA does its calculations and you have 100 slots available. You power-on 100 VMs. Now you set a reservation on a VM, this reservation will change the slotsize. HA does it calculations again based on this new slotsize. This will result in only 25 slots available based on this new slotsize. However you already used 100 slots. In other words, now you have 25 totals slots and your used is 100.