• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Yellow Bricks

by Duncan Epping

  • Home
  • Unexplored Territory Podcast
  • HA Deepdive
  • ESXTOP
  • Stickers/Shirts
  • Privacy Policy
  • About
  • Show Search
Hide Search

Scripting

Slot sizes

Duncan Epping · Oct 6, 2009 ·

I’ve been receiving a lot of questions around slot sizes lately. Although I point everyone to my HA Deepdive post not everyone seems to understand what I am trying to explain. The foremost reason is that most people need to be able to visualize it; which is tough with slot sizes. Just to freshen up an outtake from the article:

HA uses the highest CPU reservation of any given VM and the highest memory reservation of any given VM. If there is no reservation a default of 256Mhz will be used for the CPU slot and the memory overhead will be used for the memory slot!

If VM1 has 2GHZ and 1024GB reserved and VM2 has 1GHZ and 2048GB reserved the slot size for memory will be 2048MB+memory overhead and the slot size for CPU will be 2GHZ.

Now how does HA calculate how many slots are available per host?

Of course we need to know what the slot size for memory and CPU is first. Then we divide the total available CPU resources of a host by the CPU slot size and the total available Memory Resources of a host by the memory slot size. This leaves us with a slot size for both memory and CPU. The most restrictive number is the amount of slots for this host. If you have 25 CPU slots but only 5 memory slots the amount of available slots for this host will be 5.

The first question I got was around unbalanced clusters. Unbalanced would for instance be a cluster with 5 hosts of which one contains substantially more memory than the others. What would happen to the total amount of slots in a cluster of the following specs:

Five hosts, each host has 16GB of memory except for one host(esx5) which has recently been added and has 32GB of memory. One of the VMs in this cluster has 4CPUs and  4GB of memory, because there are no reservations set the memory overhead of 325MB is being used to calculate the memory slot sizes. (It’s more restrictive than the CPU slot size.)

This results in 50 slots for esx01, esx02, esx03 and esx04. However, esx05 will have 100 slots available. Although this sounds great admission control rules the host out with the most slots as it takes the worst case scenario into account. In other words; end result: 200 slot cluster.

With 5 hosts of 16GB, (5 x 50) – (1 x 50), the result would have been exactly the same. To make a long story short: balance your clusters when using admission control!

The second question I received this week was around limiting the slotsizes with the advanced options das.slotCpuInMHz and/or das.slotMemInMB. If you need to use a high reservation for either CPU or Memory these options could definitely be useful, there is however something that you need to know. Check this diagram and see if you spot the problem, the das.slotMemInMB has been set to 1024MB.

Notice that the memory slotsize has been set to 1024MB. VM24 has a 4GB reservation set. Because of this VM24 spans 4 slots. As you might have noticed none of the hosts has 4 slots left. Although in total there are enough slots available; they are scattered and HA might not be able to actually boot VM24. Keep in mind that admission control does not take scattering of slots into account. It does count 4 slots for VM24, but it will not verify the amount of available slots per host.

To make sure you will always have enough slots and know what your current situation is Alan Renouf wrote an excellent script. This script reports the following:

Example Output:

Cluster        : Production
TotalSlots     : 32
UsedSlots      : 10
AvailableSlots : 22
SlotNumvCPUs   : 1
SlotCPUMHz     : 256
SlotMemoryMB   : 118

My article was a collaboration with Alan and I hope you find both article valuable. We’ve put a lot of time into making things as straight forward and simplistic as we possibly can.

VMware Developer Communities

Duncan Epping · Aug 19, 2009 ·

The VMware Developer Communities have been overhauled and in such a way that Chip Foose would be proud. It contains all automation(SDK&API) related forums and documents including the sample code section! Another new feature I like is the “Hero Spotlight” section which currently features William Lam, Hal Rottenberg, Mike Giles and Luc Dekens. Just visit this new section of the community forums.

vGhetto Script Repository

Duncan Epping · Aug 13, 2009 ·

I regularly check William Lam’s section on the VMTN communities. William is definitely one of the most active contributors in terms of perl / vMA scripting. William wrote the famous ghettoVCB script which basically enables you to do full image level backups of your VMs. But that’s not the only script William wrote. He’s also written scripts for creating screenshots of VMs, resizing your vMA disks, hotplugging memory and CPUs, suspending VMs and a whole lot more. Definitely worth the bookmark: http://communities.vmware.com/docs/DOC-9852

Alan Renouf’s, the powershell guru, Daily Report

Duncan Epping · Jul 16, 2009 ·

Alan Renouf is definitely on of the most active bloggers when we are talking about Powershell/PowerCLI. His posts are always educational and of a high quality. I love the one-liners but nothing, absolutely nothing, beats this awesome Daily Report script that Alan has just published. I’m not going to repost his full article because I think all of you should visit Alan’s website and give him feedback on the script so he can improve it.

There is a configurable section at the start of the script where you can set how many days old you would like your snapshots to be allowed in your infrastructure, anything over this will show in the report, it will even resolve the name ( the machine running the script must be part of an Active Directory Domain) so that you can forward this email on to them and ask them if they still need the snapshot.

The outcome of the script also contains:

  • Datastores that have less than x% free space
  • VMs which have been created in the last x days and who created these
  • VMs which have been deleted and who deleted them
  • Any Virtual Center Events which have been logged during the given timeframe
  • Any VM’s which have no VMtools installed
  • The state of all VMware services on the vCenter server
  • Any Windows events from the Virtual center server which are related to VMware
  • Any VMs which have CD-Rom or Floppy Drive’s connected
  • Any hosts in Maintenance Mode
  • Any Hosts in a disconnected state

Schedule it and email it to your helpdesk on a daily base and let them check the outcome and archive it. It might come in handy sometime when you need to troubleshoot your environment, believe me it will… Thanks Alan, keep it up.

ftCLI.pl – VMware Fault Tolerance Management

Duncan Epping · Jul 1, 2009 ·

William Lam did it again. He created a script that manages FT from the command line. The script is called ftCLI.pl and here are the details:

Description: Managing VMware Fault Tolerance via the command line.

Params: The following operations are supported: create|enable|disable|stop

Requirement:
vSphere vCenter 4.0
ESX(i) 4.0
Advanced, Enterprise, Enterprise Plus or Eval licensing

Assumption: Your environment is FT capable and is configured properly

I think it speaks for itself. If you are a command line guy this is really useful! Great work William, keep it up! Just head over to the VMTN Communities for the download link and more details on how to use it.

  • « Go to Previous Page
  • Page 1
  • Page 2
  • Page 3
  • Page 4
  • Page 5
  • Page 6
  • Interim pages omitted …
  • Page 18
  • Go to Next Page »

Primary Sidebar

About the Author

Duncan Epping is a Chief Technologist and Distinguished Engineering Architect at Broadcom. Besides writing on Yellow-Bricks, Duncan is the co-author of the vSAN Deep Dive and the vSphere Clustering Deep Dive book series. Duncan is also the host of the Unexplored Territory Podcast.

Follow Us

  • X
  • Spotify
  • RSS Feed
  • LinkedIn

Recommended Book(s)

Advertisements




Copyright Yellow-Bricks.com © 2025 · Log in