Resource pool vmware что это
vSphere 7 resource pools are an integral part of clustered environments. They allow you to create different compartments within your cluster and delegate control over a cluster's resources.
Vladan Seget is an independent consultant, professional blogger, vExpert 2009-2021, VCAP-DCA/DCD and MCSA. He has been working for over 20 years as a system engineer.
- How to use VMware vSAN ReadyNode Configurator - Fri, Dec 17 2021
- VMware Tanzu Kubernetes Toolkit version 1.3 new features - Fri, Dec 10 2021
- Disaster recovery strategies for vCenter Server appliance VM - Fri, Nov 26 2021
Many new vSphere admins do not use resource pools because they seem complicated at first; however, they're part of vSphere. Moreover, this topic is required to pass the VCP-DCV VMware certification exam. I'm not surprised that the VCP exam has several sections on resource pools and resource management.
VMware vSphere 7 uses resource pools to separate and compartmentalize all resources in a cluster. A resource pool is a logical abstraction for the flexible management of resources, allowing you to create a hierarchy within your environment. Each part of this hierarchy can have different amounts of CPU or memory resources assigned from the total available within your cluster.
A resource pool can have child resource pools, such that each child receives part of the parent's resources. Child resource pools are smaller units compared to parents. A resource pool can contain other resource pools, as well as individual virtual machines (VMs).
The main advantage of managing resources via resource pools is that you do not need to set resources on each virtual machine individually. Instead, you can control the aggregate allocation of resources to the set of virtual machines by changing the settings on their enclosing resource pool.
vSphere 7 offers a new feature with resource pools. It is a new checkbox called Scalable shares that we detailed in one of our previous articles—What are VMware vSphere 7 scalable shares?
If you have more VMs that are provisioned in a resource pool, VMware vSphere 7 with scalable shares activated recalculates the entitlement for all the workloads running inside the resource pool. Scalable shares are dynamic.
Today's article will be more general and will teach you the basics of resource pools, their usage, examples, and configuration.
vSphere 7 resource pools enable the separation of resources from hardware. You can use them to manage resources independently from the actual hosts that contribute to the cluster.
Where should vSphere 7 resource pools be created? ^
Simply right-click your cluster, and from the menu, choose New Resource Pool. Note that resource pools are part of vSphere Enterprise or Enterprise Plus licensing.
Before you try, you'll need to meet a few requirements. You must have DRS enabled on your cluster.
Create a new resource pool
On the next page, you'll see this screen. You'll need to give your resource pool a meaningful name first and then choose what CPU and memory allocation you would like to have.
Configure CPU and memory in your resource pool
Shares—The Shares value indicates which virtual machine will request resources with which priority if there is a shortage of resources on an ESXi host. By default, the Shares value is 1000, but you can increase it. If you increase it, the virtual machines in this resource pool will start to prioritize the use of CPU resources, as follows:
Low (2000), Normal (4000), High (8000) or custom.
Reservation—A virtual machine needs CPU and memory resources to run. If you do not want to be affected by the resource bottleneck on the ESXi server, you need to make a resource reservation.
Expandable Reservation—If the reserved resources are not provided, the virtual machine cannot be started. If this option is selected, even if there is no resource in the resource pool, you can use the resources of the resource pool located above it and power on the virtual machine.
Limit—If you set a limit for a resource pool, you can never exceed that limit. I do not recommend that this setting be used in a production environments. For example, if the virtual machine has 2 GHz usage, if you limit it to 1 GHz, this resource will never, ever exceed 1 GHz.
Unlimited—This option should always be checked if you are not setting a limit. It indicates that there is no limit on the amount of CPU you have allocated.
Reservations
Reservations establish a minimum guarantee of resource usage. For example, if you have fours VMs belonging to Resource Pool with RAM reservation set to 4 GB, the resource pool guarantees the concurrent RAM usage of all VMs in the pool to a minimum of 4 GB jointly. It means that if VM1 is using only 0.5GB, VM2 and VM3 is using 2GB (1 GB each), VM4 can use 1.5GB.
Shares, Reservations, and Limits can also be set on a per-VM basis .
VM level - Shares, Limit and Reservation
What are some use cases for using a resource pool? ^
You might have more than one database and IIS servers in your infrastructure. Let's assume that you create a resource pool named Database and add Database servers into it. You can then create a resource pool named IIS and add your IIS-related virtual machines to it. In this way, you can perfectly allocate how much of the overall cluster resources would be available for your Database resource pool and how much for your IIS resource pool.
You might also have VMs that are part of different departments, such as Human Resources (HR), DevOps, CAD Design, Machine Learning etc. Each department might have different requirements when it comes to performance. For example, the Machine Learning VMs might need a lot compared to HR, and so on.
We looked at VMware documentation, where two different departments use a resource pool. The QA department needs more CPU. The admin simply sets the CPU shares to High for this resource pool and to Normal for the Marketing resource pool. This is the simplest example.
Resource pools are container objects in the vSphere 7 inventory, and they help to create compartments. Each compartment has its own CPU and memory settings set as a percentage of the overall cluster resources. A delegation can be created within vSphere 7, as resource pools are objects.
Example of vSphere 7 resource pool
There are also more complex cases, especially with a child resource pool. There is a checkbox called Scale Descendant Shares when you have a parent resource pool.
The Scale Descendant Shares option allows the shares allocated to each descendant resource pool to be adjusted to ensure that the relative shares allocated to the VMs are maintained. With scalable shares, the allocation for each pool factors in the number of objects in the pool. You can add/remove objects or VMs, and the shares for each object are adjusted automatically.
Note that this wasn't the case in previous releases of vSphere, where resource pools were only static.
Scale Descendant Shares option
Shares
Shares specify the relative priority or importance of a virtual machine (or resource pool). For example, if a virtual machine has triple as many shares of a resource as another virtual machine, it is entitled to consume triple 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 specify Custom as well.
Shares only come into play when there is resource contention (Memory or CPU).
Example: Creating Resource Pools
Assume that you have a host that provides 6GHz of CPU and 3GB of memory that must be shared between your marketing and QA departments. You also want to share the resources unevenly, giving one department (QA) a higher priority. This can be accomplished by creating a resource pool for each department and using the Shares attribute to prioritize the allocation of resources.
The example shows how to create a resource pool with the ESXi host as the parent resource.
- In the New Resource Pool dialog box, type a name for the QA department’s resource pool (for example, RP-QA).
- Specify Shares of High for the CPU and memory resources of RP-QA.
- Create a second resource pool, RP-Marketing.
Leave Shares at Normal for CPU and memory.
If there is resource contention, RP-QA receives 4GHz and 2GB of memory, and RP-Marketing 2GHz and 1GB. Otherwise, they can receive more than this allotment. Those resources are then available to the virtual machines in the respective resource pools.
Recently we discussed the VMware High Availability Admission Control - a very important vSphere feature. As I mentioned in the previous post, Admission Control uses some ways to calculate available CPU, memory in the cluster. One of thing that can affect the calculation is Resource Pool. In this post you will find answers to the following questions:
- What is Resource Pool?
- When using Resource Pool?
- Some good and bad practices of using Resource Pools.
Resource Pools - best practices and warnings
- Administering/organizing VMs - it is not seldom when resource pools are configured just for administration and organization of VMs. Instead of doing it, the VMware Admins should configure VM folders .
VM folders better to organize VMs.
Prioritize Resource Pools
Resource Pool for VMs
Prerequisites
The vSphere Client is connected to the vCenter Server system.
Resource Pools - the purpose of use
Resource Pools should be used whenever you would limit or guarantee resources to VMs. Revelling? 🙂 Of course, not 🙂 There can be another reason to use Resource Pools:
- Prioritizing VMs.
- Selling resource inside or outside an organization.
- Performance Isolation - for example when you have Test/Dev, Prod and also some really crucial VMs (like Business Critical Application (BCA), you can use Resource Pool to isolate/guarantee performance.
Subscribe to 4sysops newsletter!
Resource pools are particularly useful in large-scale environments with hundreds or thousands of hosts, where you need to use cluster resources effectively.
Resource pools allow you to delegate control over resources of a host (or a cluster), but the benefits are evident when you use resource pools to compartmentalize all resources in a cluster. Create multiple resource pools as direct children of the host or cluster and configure them. You can then delegate control over the resource pools to other individuals or organizations.
Using resource pools can result in the following benefits.
- Flexible hierarchical organization—Add, remove, or reorganize resource pools or change resource allocations as needed.
- Isolation between pools, sharing within pools—Top-level administrators can make a pool of resources available to a department-level administrator. Allocation changes that are internal to one departmental resource pool do not unfairly affect other unrelated resource pools.
- Access control and delegation—When a top-level administrator makes a resource pool available to a department-level administrator, that administrator can then perform all virtual machine creation and management within the boundaries of the resources to which the resource pool is entitled by the current shares, reservation, and limit settings. Delegation is usually done in conjunction with permissions settings.
- Separation of resources from hardware—If you are using clusters enabled for DRS, the resources of all hosts are always assigned to the cluster. That means administrators can perform resource management independently of the actual hosts that contribute to the resources. If you replace three 2GB hosts with two 3GB hosts, you do not need to make changes to your resource allocations.
This separation allows administrators to think more about aggregate computing capacity and less about individual hosts.
For example, assume a host has a number of virtual machines. The marketing department uses three of the virtual machines and the QA department uses two virtual machines. Because the QA department needs larger amounts of CPU and memory, the administrator creates one resource pool for each group. The administrator sets CPU Shares to High for the QA department pool and to Normal for the Marketing department pool so that the QA department users can run automated tests. The second resource pool with fewer CPU and memory resources is sufficient for the lighter load of the marketing staff. Whenever the QA department is not fully using its allocation, the marketing department can use the available resources.
The numbers in the following figure show the effective allocations to the resource pools.
You can create a child resource pool of any ESXi host, resource pool, or DRS cluster.
Note: If a host has been added to a cluster, you cannot create child resource pools of that host. If the cluster is enabled for DRS, you can create child resource pools of the cluster.
When you create a child resource pool, you are prompted for resource pool attribute information. The system uses admission control to make sure you cannot allocate resources that are not available. If you want your shares to scale dynamically when adding or removing VMs, you can select scalable shares.
Note: Shares are scaled at the parent level. All descendant resource pools created from a parent with scalable shares have scalable shares by default.
Resource Pool - overview and basic concepts
A resource pool is a logical abstraction for flexible management of resources. Resource pools can be grouped into hierarchies and used to hierarchically partition available CPU and memory resources.
Resource Pool is just a special folder/container.
Resource Pools - hierarchy.
As shown in above figure, a resource pool can contain child resource pools, virtual machines, or both. You can create a hierarchy of shared resources. The resource pools at a higher level are called parent resource pools. Resource pools and virtual machines that are at the same level are called siblings. The cluster (Tokyo-cluster) itself represents the root resource pool . If you do not create child resource pools, only the root resource pools exist.
So. Resource Pool is similar to a folder (possibility to specify permissions) but not the same, why? For each resource pool, you can specify reservation, limit, shares, and whether the reservation should be expandable. The resource pool resources are then available to child resource pools and virtual machines.
To configure Resource Pools you need to enable VMware Distributed Resource Scheduler (DRS) on a cluster. DRS is available in vSphere Enterprise and Enterprise Plus editions.
You can meet provider-consumer terminology explaining Resource Pools, e.g. here. Normally, the host/cluster is the Provider and the VMs are the Consumers. So what is Resource Pool? For example, as shown in the figure above, Resource Pool 2 is the consumer and the provider as well 🙂
Results
After you create a resource pool, you can add virtual machines to it. A virtual machine’s shares are relative to other virtual machines (or resource pools) with the same parent resource pool.
Limits
Limits specify the maximum resource usage. A server can allocate more than the reservation to a virtual machine, but never allocates more than the limit, even if there are unused resources on the system. Assigning a limit is useful if you start with a small number of virtual machines and want to manage user expectations. However, you could waste idle resources if you specify a limit.
Resource Pool - Shares, Limits and Reservations
Resource Pool provides better control of cluster resource by using Shares, Limits, and Reservations on CPU and RAM usage. Let's explain these parameters:
3 thoughts on “ VMware vSphere basics: understanding Resource Pools. ”
Great and useful article and easy to understand
thank you very much
best regards
Delphi site: daily Delphi-news, documentation, articles, review, interview, computer humor.
Для оценки потребления ресурсов пула нам пригодятся его закладки Summary и Virtual machines. Давайте взглянем на них.
Закладка Summary, рис. 6.41.
Для процессора здесь отображаются показатели:
- Consumed - текущее потребление ресурсов процессора ВМ этого пула;
Рис. 6.41. Summary для пула ресурсов
- Active - максимальное количество ресурсов, которое может быть выделено для ВМ в этом пуле. Если для пула настроен limit для процессора, то Active не будет больше limit;
- Resource Settings - здесь указаны настройки limit, reservation и shares для этого пула. Самое интересное - это значение Worst case allocation - приблизительный подсчет того, сколько ресурсов будут потреблять все включенные ВМ этого пула, если они начнут потреблять по максимуму из того, что им разрешено. Учитываются настройки limit, reservation и shares на уровне каждой ВМ, а также доступные физические ресурсы сервера и пула ресурсов.
- Private - столько мегабайт выделено для ВМ из физической оперативной памяти, и эти страницы памяти не общие;
- Shared - столько мегабайт памяти выделено для ВМ из физической оперативной памяти, но эти страницы одинаковые хотя бы для двух ВМ, и одинаковые страницы для разных ВМ адресуются в одну страницу в физической памяти. Это экономия памяти механизмом Transparent Memory Page sharing. Обратите внимание: если у трех ВМ одинаково по 10 Мб в памяти, то shared для них будет равно 30 Мб, хотя этими совпадающими данными реально в памяти сервера будет занято 10 Мб;
- Swapped - столько памяти переадресуется в VMkernel swap;
- Ballooned - столько памяти занято баллоном в гостевых ОС;
- Unaccessed - столько памяти сервера не выделено ни для одной ВМ, то есть свободно;
- Active - столько памяти активно задействуется гостевыми ОС;
- Resource Settings - здесь указаны настройки limit, reservation и shares для этого пула. Самое интересное - это значение Worst case allocation - приблизительный подсчет того, сколько ресурсов будут потреблять все включенные ВМ этого пула, если они начнут потреблять по максимуму из того, что им разрешено. Учитываются настройки limit, reservation и shares на уровне каждой ВМ, а также доступные физические ресурсы сервера и пула ресурсов.
Обратите внимание: если пул ресурсов создан в DRS-кластере, то он свою долю отсчитывает от всех ресурсов кластера, от суммы мегагерц и мегабайт всех серверов в нем.
Закладка Virtual Machines, рис. 6.42.
Здесь нам доступна разнообразная информация - особо обратите внимание на пункт View Column контекстного меню.
Рис. 6.42. Закладка Virtual Machines
К ресурсам непосредственно относятся столбцы Host CPU, Host Mem и Guest Mem:
- Host CPU - сколько мегагерц гипервизор выделяет ВМ сейчас;
- Host Mem - сколько мегабайт выделяется ВМ сейчас плюс накладные расходы памяти на нее. Величину накладных расходов можно посмотреть на закладке Summary для ВМ ^ Memory Overhead;
Conclusion
Resource Pools are very useful tools but require planning and configuring carefully. I hope that Resource Pools are now more understandable 🙂
Architect (~ 15 years experience based on passion. ) with strong background as a System Administrator and Engineer. Focused on Data Center Solutions: Virtualization/Cloud Computing and Storage/Backup Systems. Currently living in Poland.
Procedure
- In the vSphere Client , select a parent object for the resource pool (a host, another resource pool, or a DRS cluster).
- Right-click the object and select New Resource Pool .
- Type a name to identify the resource pool.
- Select the checkbox if you want to enable sclalable shares.
- Specify how to allocate CPU and memory resources.
The CPU resources for your resource pool are the guaranteed physical resources the host reserves for a resource pool. Normally, you accept the default and let the host handle resource allocation.
- Select Low , Normal , or High to specify share values respectively in a 1:2:4 ratio.
- Select Custom to give each virtual machine a specific number of shares, which expresses a proportional weight.
A nonzero reservation is subtracted from the unreserved resources of the parent (host or resource pool). The resources are considered reserved, regardless of whether virtual machines are associated with the resource pool.
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.
To specify a limit, deselect the Unlimited check box.
Final words ^
vSphere 7 resource pools are an important part of vSphere resource management. Admins leaning toward the VMware certification exam and admins who do not know how resource pools work should definitely take a closer look. Resource pools can effectively help to separate the overall resources of the cluster into compartments, where each compartment can have different CPU and memory allocations, preserving the performance of the group of VMs that needs it.
Читайте также: