Creating and Configuring Resource Pools

A root resource pool is associated with each
ComputeResource
and with each
ClusterComputeResource
.
You can create a hierarchy of resource pools by calling the
ResourcePool.CreateResourcePool
method passing in a
ResourceConfig
method as an argument. The
ResourceConfig.cpuAllocation
and
ResourceConfig.memoryAllocation
properties point to a
ResourceAllocationInfo
object that allows you to specify the information.
  • reservation
    – Amount of CPU or memory that is guaranteed available to the resource pool. Reserved resources are not wasted if they are not used. If the utilization is less than the reservation, the resources can be utilized by other resource pools or running virtual machines.
  • expandableReservation
    – In a resource pool with an expandable reservation, the reservation on a resource pool can expand beyond the specified value, if the parent resource pool has unreserved resources. A non-expandable reservation is called a fixed reservation. See Understanding Expandable Reservation. This property is ignored for virtual machines.
  • limit
    – Upper limit for CPU or memory resources assigned to this resource pool. The virtual machine or resource pool does not exceed this limit, even if resources are available. This property is typically used to ensure consistent performance. Set this property to -1 to indicate no fixed upper limit on resource usage.
  • shares
    – Relative metric for allocating memory or processing capacity among multiple resource pools. The
    SharesInfo
    data object has two properties,
    level
    and
    shares
    , that allow you to specify resource allocation.
    • level
      – Choose
      high
      ,
      low
      , or
      normal
      to map to a predetermined set of numeric values for shares. See the
      API Reference Guide
      for the numbers for CPU, memory, and disk shares. Set this property to
      custom
      to specify an explicit number of shares instead.
    • shares
      – Allows you to specify the number of shares you want to allocate to the resource pool. The allocation is divided evenly between resource pools with the same level.
Calling the
ResourcePool.UpdateConfig
or
ResourcePool.UpdateChildResourceConfiguration
method allows you to change the configuration.