PracticeVideosBlogFlashcards

4.2 Resource Allocation: Shares, Reservations & Limits

Key Takeaways

  • Shares set relative priority during contention; they do not cap idle capacity.

  • Reservations guarantee entitlement and affect admission control; CPU reservations do not pin exclusive cores.

  • In the standard example, 64 GB configured RAM minus a 48 GB reservation leaves a 16 GB main guest swap file.

  • Limits can constrain a VM despite spare physical capacity; expandable pool reservations can obtain eligible parent capacity.

Last updated: October 2026

4.2 Resource Allocation: Shares, Reservations & Limits

In a multi-tenant enterprise private cloud, virtual machines share a common substrate of physical server hardware. When workload demands exceed physical compute or memory capacity, the ESXi VMkernel must arbitrate resource distribution deterministically. VMware vSphere provides three foundational allocation primitives—Shares, Reservations, and Limits—to control resource entitlement and contention. Application performance also depends on storage, networking, guest behavior and available capacity.


Resource Allocation Fundamentals: CPU (MHz) vs. Memory (MB/GB)

The hypervisor manages two distinct physical resource domains:

  • CPU Allocation: Measured in Megahertz (MHz) or Gigahertz (GHz). Physical CPU execution is time-sliced across physical cores (pCPUs) by the VMkernel proportional share scheduler. Because CPU is a non-fungible, non-storable resource (idle CPU cycles cannot be saved for later), contention is managed by scheduling thread execution queues and adjusting time slices.
  • Memory Allocation: Measured in Megabytes (MB) or Gigabytes (GB). Physical memory consists of physical DRAM addresses (HPAs). Unlike CPU cycles, memory pages are stateful and persistent; a physical page allocated to one VM cannot be reassigned to another without first reclaiming it through Transparent Page Sharing, ballooning, compression, or hypervisor swapping.

Proportional Shares: Allocation Values & Contention Dynamics

Shares specify the relative priority or proportional weight of a virtual machine to access physical resources only when there is resource contention.

The Operational Law of Shares: Contention vs. Non-Contention

Important: Shares have zero effect when physical resources are unconstrained.

If an ESXi host operates at 30% aggregate CPU utilization, an idle low-priority virtual machine configured with Low shares can consume up to 100% of its provisioned vCPUs. The hypervisor does not artificially restrict or throttle workloads based on shares when surplus physical capacity exists. Shares are activated and enforced by the VMkernel scheduler only when the demand from all runnable threads exceeds the physical capacity of the host or resource pool.

Standard Share Values & Relative Weights

VMware provides standard pre-defined share tiers, which scale proportionally with the virtual machine's configured compute sizing:

Allocation TierCPU Shares (per vCPU)Memory Shares (per MB of Configured RAM)Relative Priority Weight
High2,000 shares / vCPU20 shares / MB2x Normal (4x Low)
Normal1,000 shares / vCPU10 shares / MB1x Baseline (2x Low)
Low500 shares / vCPU5 shares / MB0.5x Normal
CustomUser-defined integerUser-defined integerArbitrary relative weight

The Proportional Share Formula

For equally demanding sibling workloads without differing reservations or limits, a simplified proportional-share calculation illustrates relative priority:

                                  Shares(VM_i)
Illustrative Share Fraction(VM_i) = --------------------  x Total Available Resources
                              Sum of All Active Shares

Sizing Multiplier Nuance

Because standard shares are allocated per vCPU and per MB of RAM, sizing directly impacts overall priority. Consider an ESXi host running two VMs under 100% CPU contention:

  • VM-1 (Database): 8 vCPUs configured with Normal shares; total shares equal 8 multiplied by 1,000, resulting in 8,000 CPU shares.
  • VM-2 (App Server): 2 vCPUs configured with High shares; total shares equal 2 multiplied by 2,000, resulting in 4,000 CPU shares.

Even though VM-2 has "High" shares and VM-1 has "Normal" shares, VM-1 receives twice the total scheduling entitlement (8,000 / 12,000 = 66.7%) compared to VM-2 (4,000 / 12,000 = 33.3%) because of its larger compute footprint. When equal priority between differently sized VMs is desired, administrators must utilize Custom shares.


Resource Reservations: Guaranteed Commitments & Power-On Admission Control

A Reservation defines an explicit, guaranteed floor of physical resources committed to a virtual machine. The reservation establishes guaranteed resource entitlement subject to admission control:

  • Reservation Entitlement: A CPU reservation guarantees scheduling capacity when needed; it does not pin exclusive physical cores. Idle CPU capacity can be used by other workloads. Memory reservations protect the reserved guest memory from host reclamation. Account for both reservations and overhead when checking placement.
  • Power-On Admission Control: When an administrator powers on a virtual machine configured with reservations, ESXi and vCenter execute strict admission control validation. The hypervisor checks if the unreserved physical capacity of the host (or resource pool) is greater than or equal to the requested reservation plus hypervisor virtualization overhead. If insufficient unreserved physical capacity exists, the virtual machine is prohibited from powering on, generating an admission control failure error.

Memory Reservations & Datastore Swap File (.vswp) Dynamics

One of the most critical architectural mechanisms tested on the 2V0-16.25 examination is the direct causal relationship between a virtual machine's memory reservation and the size of its datastore swap file ([vmname].vswp).

The Swap Sizing Equation

When a virtual machine powers on, ESXi must guarantee that in the catastrophic event of severe physical memory exhaustion, every configured byte of guest RAM can be backed by physical storage. The VMkernel guarantees this by creating a virtual swap file (.vswp) on the VM's datastore according to this strict formula:

Swap File Size (.vswp) = Configured Memory - Reserved Memory

(Note: A small auxiliary swap file may also be created for VMkernel internal process overhead, but the main guest swap file strictly matches the formula above).

Concrete Architectural Scenarios

Configured RAMMemory ReservationDatastore .vswp File SizeHost DRAM GuaranteedOperational & Storage Impact
32 GB0 MB (Default)32 GB0 GBMaximum datastore consumption; 32 GB storage allocated; VM vulnerable to hypervisor swapping under host memory pressure
32 GB16 GB (Partial)16 GB16 GB16 GB allocated on datastore; 16 GB physical DRAM locked; up to 16 GB can be swapped to disk during emergency contention
32 GB32 GB (100% Full)0 GB (0-byte stub)32 GBZero datastore swap space required; 32 GB physical DRAM permanently committed; hypervisor swapping is completely eliminated
64 GB48 GB (Partial)16 GB48 GBExactly 16 GB allocated on datastore storage; 48 GB guaranteed in physical DRAM

Architectural Implications for Storage Sizing

In large VDI or server consolidation clusters with thousands of virtual machines and default reservations (0 MB), the aggregate size of .vswp files can consume terabytes of high-performance datastore capacity. In contrast, configuring a 100% memory reservation reduces .vswp datastore allocations to zero bytes, preserving storage space and preventing hypervisor swapping latency at the cost of reducing host memory overcommitment flexibility.


Limits: Mechanics, Use Cases & Performance Hazards

A Limit specifies an absolute, non-negotiable ceiling on the consumption of CPU cycles (MHz) or memory (MB) that a virtual machine can consume. By default, both CPU and memory limits are set to Unlimited.

Operational Hazards of Limits

Setting hard limits on virtual machines in production enterprise environments is strongly discouraged by VMware due to severe architectural pitfalls:

  1. CPU Limit Bottleneck: If an 8-vCPU virtual machine hosting a relational database is configured with a CPU limit of 2,000 MHz, the VMkernel artificially caps its execution once that threshold is reached. Even if the underlying physical host cores are 95% idle, the database threads are forcefully throttled into ready queues (%RDY climbs), creating synthetic application performance degradation.
  2. Memory Limit Swapping Trap: If a virtual machine configured with 32 GB of vRAM is assigned a hard memory limit of 16 GB, the hypervisor prohibits the VM from consuming more than 16 GB of host physical DRAM. The moment the guest OS attempts to touch more than 16 GB of memory, ESXi forces the vmmemctl balloon driver to inflate or immediately begins hypervisor swapping guest memory to the .vswp file, inducing massive disk I/O latency despite abundant free physical RAM across the host.

Valid Use Cases for Limits

Limits should be restricted to isolated non-production environments:

  • Constraining runaway test/development workloads from impacting shared staging clusters.
  • Enforcing strict contractual tiering in external multi-tenant service provider architectures.

Resource Pools & Expandable Reservations

A Resource Pool is a logical abstraction that compartmentalizes CPU and memory allocations across a group of virtual machines or child pools within a standalone host or DRS cluster.

Fixed vs. Expandable Reservations

When configuring a child resource pool, the administrator specifies its reservation and whether that reservation is Expandable:

  • Fixed Reservation (Expandable = Disabled): The pool can only satisfy reservations from its own locally configured reservation bucket. If all 32 GB of a pool's reservation is consumed by running VMs, attempting to power on an additional VM requiring a 4 GB reservation will immediately fail admission control—even if the parent cluster has hundreds of gigabytes of unreserved physical memory.
  • Expandable Reservation (Expandable = Enabled, Default): If a child pool lacks sufficient local unreserved capacity to satisfy a power-on request or reservation increase, it dynamically queries its parent resource pool (and recursively up the tree to the cluster root). If the parent holds unreserved capacity, the child temporarily borrows the required resources, satisfying admission control and allowing the workload to power on.

Resource Allocation Comparison Matrix

Control AttributeOperational DefinitionEnforcement WindowContention TriggerArchitectural Best Practice
SharesProportional priority weight (High, Normal, Low, Custom)Dynamic execution schedulingActive only during contention; zero effect when idleUse Normal by default; assign High to mission-critical VMs to prioritize queue access during crises
ReservationGuaranteed floor of physical compute (MHz) or RAM (MB)Enforced continuously from VM power-onAlways enforced via Admission ControlReserve 100% memory for tier-1 databases to eliminate .vswp files and prevent swapping
LimitRigid ceiling on maximum resource consumption (MHz or MB)Enforced continuously regardless of idle capacityAlways active; artificially throttles workloadsLeave set to Unlimited; avoid in production to prevent synthetic CPU starvation and forced swapping
Expandable ReservationHierarchical borrowing mechanism for resource poolsEvaluated during power-on admission controlActive when child pool capacity is exhaustedEnable on child pools to prevent false-positive admission control power-on failures

Official Reading

Use the official 2V0-16.25 objective guide for scope and Broadcom technical documentation for the installed 9.0 component. This independent lesson was reviewed October 18, 2026; actual deployment support depends on the applicable version and configuration.

Review Takeaways

  • Shares set relative priority during contention; they do not cap idle capacity.
  • Reservations guarantee entitlement and affect admission control; CPU reservations do not pin exclusive cores.
  • In the standard example, 64 GB configured RAM minus a 48 GB reservation leaves a 16 GB main guest swap file.
  • Limits can constrain a VM despite spare physical capacity; expandable pool reservations can obtain eligible parent capacity.
Test Your Knowledge

A critical database virtual machine is configured with 64 GB of vRAM and an explicit memory reservation of 48 GB. Assuming no memory overhead reservation and standard datastore placement, what is the exact size of the virtual machine swap file (.vswp) created on the datastore when the VM powers on?

A

64 GB, because ESXi always provisions a swap file matching the full configured memory to guarantee disaster recovery.

B

0 GB, because any reservation exceeding 50% automatically suppresses swap file creation.

C

16 GB, because the swap file size is calculated as Configured Memory minus Reserved Memory.

D

48 GB, because the swap file must match the reserved physical memory allocated to the host DRAM.

Test Your Knowledge

Two virtual machines, VM-Alpha (4 vCPUs, High CPU shares) and VM-Beta (4 vCPUs, Normal CPU shares), reside on the same ESXi host. During off-peak hours, the host runs at 25% overall CPU utilization, while VM-Beta experiences a surge in transaction processing. How does the VMkernel scheduler distribute CPU resources during this unconstrained period?

A

VM-Beta is throttled to 50% of the CPU cycles allocated to VM-Alpha because its shares are half of VM-Alpha's shares.

B

VM-Beta is permitted to consume as many physical CPU cycles as its workload demands, up to the full capacity of its 4 vCPUs, because shares have no effect in the absence of contention.

C

The scheduler redistributes 2 vCPUs from VM-Beta to VM-Alpha to maintain the proportional share ratio defined at the cluster level.

D

VM-Beta can only burst beyond its Normal share entitlement if the administrator enables an expandable reservation on its parent resource pool.

Test Your Knowledge

A child resource pool named 'Analytics' has a configured memory reservation of 32 GB, of which all 32 GB is currently committed to running virtual machines. An administrator attempts to power on an additional virtual machine requiring a 16 GB reservation inside this pool. The parent resource pool has 64 GB of unreserved memory available. Under what configuration will the virtual machine successfully power on?

A

The Analytics resource pool must have the 'Expandable Reservation' setting enabled, allowing it to dynamically query and borrow the required 16 GB reservation from its parent pool.

B

The administrator must change the virtual machine memory shares from Normal to Custom to override admission control.

C

The virtual machine must be configured with an explicit memory limit equal to its configured memory size.

D

The parent resource pool must be converted to a Distributed Resource Scheduler (DRS) cluster root pool with fixed reservation locking.

Sections you finish are checked off in the contents.