Introduction
The topic of resource reservation and allocation is very delicate. I am of the school of thought that is better to have enough resources to make everyone happy and still be at 75% utilization rather than having to manage resource shares. Well, in an ideal world everyone gets its own share and never takes more, right? For the real world in which the budget is never enough, and VM’s roam the hosts consuming resources unscrupulously we have the vSphere feature of resource allocation/management.
Resource Allocation Shares
Shares specify the relative importance of a virtual machine (or resource pool). If a virtual machine has twice as many shares of a resource as another virtual machine, it is entitled to consume twice as much of that resource when these two virtual machines are competing for resources.
Shares are typically specified as High, Normal, or Low and these values specify share values with a 4:2:1 ratio, respectively. You can also select Custom to assign a specific number of shares (which expresses a proportional weight) to each virtual machine.
These values depend on the number of vCPUs and RAM on each VM. Take a look at Table 2-1 on page 12 in the vSphere Resource Management pdf (link at the bottom).
Figure 1. Right click on a VM and select Edit Resource Settings:
Figure 2. Edit Resource Settings Window:
Here you will find the values I mentioned before, and a couple more. The Reservation is the guaranteed allocation of resources and the Limit is the upper limit.
We can also configure Resource Pools to simplify the administration of resources, instead of configuring resources on a per VM basis, we can manage those VMs in groups.
One last concept you should be familiar with is Admission Control (before we dive into the blueprint for this topic).
When you power on a virtual machine, the system checks the amount of CPU and memory resources that have not yet been reserved. Based on the available unreserved resources, the system determines whether it can guarantee the reservation for which the virtual machine is configured (if any). This process is called admission control. If enough unreserved CPU and memory are available, or if there is no reservation, the virtual machine is powered on. Otherwise, an Insufficient Resources warning appears.
Check this post about Resource Pools by Duncan Epping on Yellow-Bricks, it is a little bit old, but I think is still relevant.
After this brief introduction, I am going back to the exam blueprint and try to explain each concept. In this section we are going to cover the following topics:
- Create/Remove a Resource Pool
- Add/Remove virtual machines from a Resource Pool
- Configure custom resource pool attributes
- Determine the effect of the Expandable Reservation parameter on resource allocation
- Create a resource pool hierarchical structure
- Determine how resource pools apply to vApps
- Describe vFlash architecture
- Create/Delete vFlash Resource Pool
- Assign vFlash resources to VMDKs
- Given a scenario, determine appropriate shares, reservations and limits for hierarchical Resource Pools
Create/Remove a Resource Pool
From you Home view in the vSphere Web Client, click Hosts and Clusters in the middle pane, then right click on a host to find the New Resource Pool link.
Figure 1. New Resource Pool
Figure 2. New Resource Pool Configuration Window
After you create a Resource Pool you ca delete it by going to the same view from which you created it and right cl1ck on the Resource Pool name.
Fogire 3. Remove Resource Pool
Click Yes on the popup confirmation dialog window and done.
Add/Remove virtual machines from a Resource Pool
You can drag and drop the VM in and out of at Resource Pool or you can migrate the VM into a Resource Pool.
Video 1. Migrate a VM to a new Resource Pool
Configure custom resource pool attributes
Going back to Resource Allocation Shares:
Shares are typically specified as High, Normal, or Low and these values specify share values with a 4:2:1 ratio, respectively. You can also select Custom to assign a specific number of shares (which expresses a proportional weight) to each virtual machine.
Figure 4. Custom Resource Pool Attributes
If you click on the Resource Pool (RP-Parent) then you can click on Edit resource pool settings and the configuration dialog will appear.
Determine the effect of the Expandable Reservation parameter on resource allocation
When the check box is selected (default), expandable reservations are considered during admission control. If you power on a virtual machine in this resource pool, and the combined reservations of the virtual machines are larger than the reservation of the resource pool, the resource pool can use resources from its parent or ancestors.
In other words, if my son wants to watch a movie and he only has $3 he will come to me and ask for money, if I have some cash and I can give it to him, then he can go to the theater, if not he stays home.
There is a great example on page 57 of the Managing Resource Pools pdf (link at the bottom).
Create a resource pool hierarchical structure
Figure 5. Parents, Children, and Siblings in Resource Pool Hierarchy
The root resource pool is the cluster in this case.
Determine how resource pools apply to vApps
A vSphere vApp allows packaging of multiple interoperating virtual machines and software applications that you can manage as a unit and distribute in OVF format.
A vApp can contain one or more virtual machines, but any operation carried out on the vApp, such as clone or power off, affects all virtual machines in the vApp container
Reservations on vApps and all their child resource pools, child vApps, and child virtual machines count against the parent resources only if those objects are powered on.
Procedure
1. Navigate to a vApp in the inventory and click Edit vApp Settings.
2. In the Deployment section, click CPU resources to allocate CPU resources to this vApp.
3. In the Deployment section, click Memory resources to allocate memory resources to this vApp.
4. Click Ok.
Describe vFlash architecture
VMware vSphere Flash Read Cache virtualizes server side flash providing a high performance read cache layer that dramatically lowers application latency. The caching is fully transparent to the VM without requiring any guest agents. Flash Read Cache enables allocation of flash resources at a per-VMDK granularity providing VMware vSphere vMotion consistent read caching and integration with VMware vSphere Distributed Resource Scheduler for initial placement.
vFRC is enabled on a per-VMDK basis. Each VMDK can be configured with a certain size of flash cache with a certain cache block size. Once vFRC is enabled for a virtual disk, the cache is created when the virtual machine boots. vFRC is a writethrough cache. This means that even though write I/O requests are cached by vFRC, I/O request completion status is sent to the guest virtual machine only after the data is written to physical storage. Because of this design, there is no change in the existing data reliability and availability guarantees.
Create/Delete vFlash Resource Pool
Figure 6. Navigate to Host and Clusters -> Click a Host -> Click Manage -> Click Settings -> Click Virtual Flash Resource Management and then click on Add Capacity
Figure 7. Selection Dialog Window
After you select the capacity in figure 7, you will be able to see the available amount in figure 6.
Assign vFlash resources to VMDKs
Figure 8. Edit settings on a VM to add vFlash to a vmdk. Click Advance to enable the cache
Given a scenario, determine appropriate shares, reservations and limits for hierarchical Resource Pools
For individual VMs take into consideration the number of vCPUs and the amount of memory:
For example, an SMP virtual machine with two virtual CPUs and 1GB RAM with CPU and memory shares set to Normal has 2×1000=2000 shares of CPU and 10×1024=10240 shares of memory.
You can find a good example on pages 56 and 57 of the vSphere Resource Management.
====
Resources