Resource Pool- Part 2

Hello Everyone! In my first post I have explained about resource management and little bit about resource pool, Share, Limits and Reservations. I would highly recommend you to visit that post “Resource Pool – Part 1” if you have not done yet.

In this section I will talk about-

  • Resource Pool Hierarchy 
  • Create a resource pool 
  • Add/Remove VM(s) from resource pool
  • Expandable resource pool

Resource Pool Hierarchy

It is important to understand Resource pool hierarchy because if you don’t consider this while planning out resource pool then it may have adverse effect on Virtual machines. So let us refer below picture.

**Pic Courtesy: VMware 

RS Hierarchy
Resource Pool Hierarchy 

So what we are seeing here is root resource pool, Siblings, Parent resource pool and child resource pool. Here, DRS cluster named as CL-1 itself is a root resource pool because it is containing aggregate resources which are coming from ESXi hosts. Based on available resources it distribute resources to its child objects which can be virtual machines or resource pool.

CL-1 has 2 resource pool RP-Marketing and RP-QA respectively. These 2 are siblings to each other because they are sharing the same hierarchy. All 3 VMs which are in RP-Marketing are sibling to each other and sharing  the same relationship with their parent resource pool.

Also, resource pool can be nested with one another. If you refer the above pic then you will notice that RP-QA-UI is a child resource pool under RP-QA. In this case RP-QA is parent resource pool of RP-QA-UI resource pool.

Info: However, You can not define any more than 8 resource pool deep. Each Host can support up to 1600 resource pools which is also maximum number of resource pool per cluster.  #vSphere6

I will discuss later on why we need to keep resource pool hierarchy in mind during planning for it.

Tips: It is best practice to not allow VMs and resource pools to be siblings with each other. Otherwise, when there is contention, it is very likely for the VMs inside the pool to loose out in competion with VMs outside the pools.

As of now let us discuss on how to create resource pool and how to move VM(s) to it.

How to create a Resource pool ?

Steps are pretty much simple for creating a resource pool

  1. In the vSphere Web Client navigator, select a parent object for the resource pool (a host, another resource pool, or a DRS cluster).
  2. Right-click the object and select New Resource Pool.
  3. Type a name to identify the resource pool.
  4. Specify how to allocate CPU and memory resources.
  5. Finish
How to create Resource Pool
New Resource Pool Wizard 

How to move virtual machine to a resource pool?

  1. Locate respective VM from Web Client.
  2. Right Click and Select Migrate.
  3. Select Migration type as “Change Compute Resource Only”
  4. Select respective resource pool in which you would like to move this VM.
  5. Select Network, Do not change the network if it is not needed.
  6. Finish.

You can also migrate multiple VMs all together to a resource pool. In Virtual machine Tab select required VMs and migrate as per above process.

What is expandable resource pools?

If you review above pic titled “New Resource Pool Wizard” then you will notice that there is a check box labeled as Reservation Type Expandable. You must be wondering what this option is all about. Let’s discuss this further more.

Well as you have already know that VMs residing in resource pool gets resources from its parent resource pool. So let us assume that resource pool runs out of resources due to badly planned resource pool or unexpected resource demand, VMs residing in are not able to get reserved amount of resources then what will happen? Do we have any way to tackle this out? and answer is yes. It is expandable reservation

Expandable reservation allows resource pools to grow because they allow more VMs to power on even if their aggregate reservation exceeds the resource pool reservation. When you enable this check box for reservation type as expandable then it gets the resources from its parent in the event of resource contention. This process continues till VMs get required resources.

For example, refer below pic once again.

RS Hierarchy

Let is assume that we have 2 VMs in RP-QA-UI, Each VM having reservation of 2 GB of memory each. which means each VM will require 2GB + Overhead memory to power on the VM. Currently VM-Marketing is powered on and when we try to power on VM vcy169-w2k3net-lsi it fails to power on due to “insufficient resources” . Clearly there is not enough resources available for this VM. If its parent resource pool which is RP-QA-UI is set to expandable resource pool then admission control check its parent resource pool which is RP-QA, if there are resources available on RP-QA then admission control power on the VM. Admission control does this job until it check complete hierarchy. if there are still not enough resources available then it fails to power on.

In above example RP-QA-UI did not had enough resources hence it got the resources from its parent which is RP-QA. This has happened because resource pool reservation was expandable.

That’s it for now in this section. I will post one last section for resource pool and will discuss more on its planning and use cases.

Hope you liked this post. Please provide your feedback to me under comment section if you have any.

 

Resource Pool – Part 1

“Virtualization is all about Optimization, Efficiency, Scalability and Availability!”

Resources are something which comes at a cost. No matter how much resources you have if you don’t manage it well you become inefficient in your game. Hence resource management becomes key part to achieve Optimization, Efficiency, Scalability and Availability. In this post I will talk about resource pool, one of the key component which plays an important role in resource management. Also this post will certainly help a VMware Rookie to understand more about resource pool.

When we talk about resources in the context of resource pools then it means that we are specifically talking about CPU and Memory. 

In virtualization you deploy multiple virtual machines on top of hypervisior which in turn uses same hardware resources. Simply one hardware and multiple OS on top of that that’s cool stuff right! But how it is decided that what amount of resources a VM should get from available resources? What will happen when multiple VMs are competing for the same amount of resources at the same time? How can we ensure that VM(s) must get required amount of resources?. All these scenarios can be dealt with the help of resource pool.

In order to understand resource pool we need to understand Shares, Reservations and Limits first.

Shares: Shares represents relative importance of a virtual machine with respect to other VM(s)/Resource Pool. Shares are typically specified in 3 categories which is High, Normal, Low and these shares are specified with 4:2:1 ratio respectively. which means High share will get 4/7 resources out of total available, Normal will get 2/7 and low will end up getting 1/7 resources in the event of contention. By default, Shares are set to Normal for VM or Resource Pool.

Shares
Default Shares: High, Normal and Low

Reservation: Reservation is minimum guaranteed amount of resources (CPU/Memory) specified for a VM. If this guaranteed amount is not available to VM then VM fails to power on. Usually for critical VMs it is good to have reservation specified. By default there are no reservation set for VM or Resource Pool.

Limit: Limit specifies upper bound of  resources which can be allocated. This mean that a VM can not utilize resources more than specified limit even it has resource available to it. By default there are no reservation set for VM or Resource Pool.

It is not mandatory to have resource pool to configure Shares, Limits and Reservations on VM(s). You can configure these setting on VM(s) individually.

What is Resource Pool? 

Resource pool is a logical container which help us to prioritize importance of virtual machines. This is done by using 3 key attributes which are Shares, Reservations and Limits. VM(s), vApp and Resource pool itself can be a member of resource pool. Also, Resource pool gets resources from its parent and then allocates resources based on its attributes.

Resource Pool can be created on Standalone ESXi Host or DRS Cluster.

So far we have discussed about key attributes for resource pools and very basics of it. In next section I will talk about how to create resource pools and will compare and contrast different use cases for resource pools.

Stay tuned for my next post. Enjoy!