During our session at the Dutch VMUG Frank was explaining Resource Pools and the impact of limits and reservations. As I had the feeling not everyone in the room was using resource pools I asked the following questions:
- How many people are using Resource Pools today?
- Out of the roughly 300 people who attended our session 80 showed their hands. The follow-up question I asked was…
- How many people change the Shares setting from the default?
- Out of those 80 hands roughly 20 people raised their hands and that lead me to the next question…
- How many people change the Shares value based on the amount of VMs running in that Resource Pool?
- Now only a handful of people raised their hand.
That is what triggered this post as I believe it is an often made mistake. First of all when you create a Resource Pool there are a couple of things you can set a reservation, a limit and of course shares. For some reason shares are often overlooked. There are a couple of things I wanted to make sure everyone understands as judging by the numbers of hands that were raised I am certain there are a couple of common misunderstandings when it comes to Resource Pools:
- If you create a Resource Pool a default Shares value is defined for the resource pool on both Memory and CPU
- Shares specify the priority of the resource pool relative to other resource pools on the same level
This means that even if you don’t touch the shares values they will come into play whenever there is contention. This also means that the resource allocation on a VM level is dependent on the entitlement of the resource pool it belongs to.
Now what is the impact of that? I guess I should quote from the “The Resource Pool Priority-Pie Paradox” blog post my colleague Craig Risinger wrote as it clearly demonstrates the issues that can be encountered when Resource Pools are used and Shares values are not based on the relative priority AND the amount of VMs per pool.
“Test” 1000 shares, 4 VMs => 250 units per VM (small pie, a few big slices):
“Production” 4000 shares, 50 VMs => 80 units per VM (bigger pie, many small slices):
I guess this makes it really obvious that shares might not always give you the results you expected it would.
Another issue that could arise is when Virtual Machines are created on the same level as the Resource Pools…. Believe me it doesn’t take a lot for a single VM to have higher priority than a Resource Pool in times of contention.
Again, whenever you create a Resource Pool it will “inherit” the default shares value, which equals a 4vCPU/16GB Virtual Machine, and whenever there is contention these will come into play. Keep this in mind when designing your virtual infrastructure as it could potentially lead to unwanted results.