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.
Brandon says
This is such a problem, it needs fixed. You and I have had some correspondence when I was trying to find a way to avoid this issue while using vApps for all its benefits, but a vApp works just like a resource pool and creates the same issues if you’re not careful. I ended up deciding not to use vApps.. which to say “that sucks” would be putting it mildly. I wonder how many admins read through your blog posts and have an oh sh*t! moment. You’ve done a good job of helping to disseminate this important info. It is shocking to see that so many people at the VMUG were unaware of this though.
Duncan Epping says
I will make the developers aware of the issue, you can count on that.
Cianokuraz says
hi
even if VMware, blogs etc etc, suggest to use the resource pools, is a common practice to avoide them in same way.
Why? I think many people are afraid of metrics(what are the right values to choose and things like that), perhaps they(metrics or usage of) are not very clear and easy to use and apply, so rather than using resource pools, we prefer to put everything in one pot. This attitude, I think, is even more pronounced in environments where the number of virtual machines is high .. personally, in my company, where the number of virtual machines is over a thousand, we started to use the resource pools only in the last months, because at the beginning they only created problems, due to our ignorance of course:)
Sean Clark says
Just some general thoughts on resource pools requiring automatic configuration to be useful in the cloud.
Learning (sometimes the hard way) how resource pools work, is only half the battle. Because even if you know how to set them up properly, that setup is only good for that point in time. You would have to continually monitor and be able to dynamically adjust your resource pool settings or adjust the amount of VMs in the pool.
This obvously is not cost-effective to have someone skilled in the arts of VMware resource management to manually monitor and adjust. But it is a definite need for highly dynamic virtualized environments or clouds. It’s for these reasons that I’m very interested to see what VMWare does with the Integrien acquisition.
Dan says
Hello,
Can you please have a look at this discussion on VMware Communities: http://communities.vmware.com/message/1661759
Apparently when a virtual machine and two resource pools are at the root level, the vm has 100% memory shares.
Thank you!
Duncan Epping says
just commented on the topic.
@sean: http://www.yellow-bricks.com/2010/02/24/custom-shares-on-a-resource-pools-scripted/
cianokuraz says
Duncan..
this is a strange request..
i’m daltonic…i really have difficulties to distinguish some colors in resources tab, to me active and swapped appears the same 🙂
is there a way to change (or customize) the colors?
am i the only one?
Hussain says
Hi,
Well, I would say that you need to understand the Resource Pool how it works and how you assign this Pool to certain VMs for higher/lower workloads.
Tom Delamalle says
Yes! my theory was correct.
During conventions I always heard how easy resource pools where but when I wanted to deploy them (+- 2years ago) it became very clear that setting up resource pools is not that simple at all.
You really need to recalculate everything each time a new Virtual machine is added to the cluster. At that time I tried to make some kind of formula or script which could do that for me but I never succeeded. (because of time limits, other project, etc etc…)
Maybe now with Powercli it might be easier… I think I’m going to give it another try once i get some spare time for this.
Off-course if someone beats me to it let me know please 🙂
Alexander says
We’re currently debating where we will go with Resource Pools. Currently we have a couple of root Pools with nested pools inside of them more or less mirroring the VMs and Templates view folder structure. Because of this post we have realized that this is not exactly an ideal situation, so I’d like to pose a question if I may.
The two paths that we considering are as follows:
1) Ditch all resource pools so that all VMs are at the same level with the expectation of creating resource pools at the root as needed
2) Creating a resource pool per service for all services
Option 1 would simplify matters administratively, with resource pools being created on an as-needed basis.
Option 2 would put all services on an equal stance.
Any thoughts would be appreciated. Are we on the right track here?
AbeS says
I was thinking of implementing custom shares for our enviroment. The Resource Pools would be the following:
Prod, QC, Test
I was going to build out a script to allocate shares using a share factor for each envirnonment. For instance:
Prod = 55
QC = 30
Test = 15
These share factors would then be multiplied by the number of Virtual Machines:
Prod = 55 x 10 machines = 550 shares
QC = 30 x 15 machines = 450 shares
Test = 15 x 6 machines = 90 shares
I think that there is a problem with this calculation, in that you are not taking into account the amount of vCPU’s or Memory that is allocated to the VMs. So for the CPU Share calculation shouldn’t you just use the number of vCPU’s times the Share Factor for the Resource Pool? and vice versa for the Memory Share Calculation?
Prod = 55 x 24 vCPUs = 1320
QC = 30 x 20 vCPUs = 600
Test = 15 x 6 vCPUs = 90
Jason Eden says
Resource pools, if deployed correctly, allow you a level of resource management that is simply impossible to achieve using any other alternative, other than perhaps fine-tuning each individual VM in a given environment. While I appreciate the commentary, I fear the discussion has lent itself to a dismissal of resource pools rather than a thoughtful “what’s the right way to think about them” discussion.
In my view, Resource pools are simply ways to segment resources in a cluster. It’s just like deploying to individual servers. If I add more VMs to a server, I’d better hope I have enough resources for them, and the same is true for resource pool settings. What I get with pools, however, that I don’t get with individual servers, is the ability to dynamically change things on the fly when I recognize I am short of resources.
If anyone is aware of another technology that allows me to preserve performance of large groups of virtual machines in a large, complex cluster of servers without tweaking settings on each individual VM, I’d love to hear about it.