How does hypervisor track CPU utilization per partition?

How does hypervisor track CPU utilization per partition?

In IBM PowerVM, the hypervisor tracks CPU utilization per partition (LPAR) using hardware-assisted accounting + fine-grained scheduling counters. The goal is to know exactly how much physical CPU time each LPAR actually consumes vs. what it is entitled to.


🚀 Core Idea

Every time a virtual processor from an LPAR runs on a physical core, the hypervisor:

👉 Starts a timer → runs the workload → stops the timer

That elapsed time is accounted to that specific LPAR


⚙️ How CPU Utilization Is Tracked

1. Dispatch-Time Accounting (Core Mechanism)

  • When a virtual processor is dispatched:
    • Hypervisor records start timestamp
  • When it is preempted:
    • Records end timestamp

👉 CPU usage = accumulated run time across all dispatches


2. Per-Partition Counters

The hypervisor maintains counters such as:

  • Entitled CPU time (guaranteed share used)
  • Consumed CPU time (actual usage)
  • Idle time (when LPAR had no work)
  • Wait time (ready but not scheduled)

👉 These are tracked continuously


3. Physical Processor Mapping

  • Tracks which physical cores and SMT threads:
    • Each LPAR runs on

👉 Enables:

  • Accurate per-core utilization
  • Load balancing decisions

4. Timebase / Hardware Registers

POWER processors provide:

  • High-resolution timebase registers

👉 Hypervisor uses these to:

  • Measure CPU time precisely (nanosecond-level granularity)

5. Virtual Processor State Tracking

Each vCPU can be in states like:

  • Running
  • Ready (waiting)
  • Idle

👉 Hypervisor tracks transitions between these states to compute:

  • CPU ready time
  • Utilization vs demand

6. Shared Processor Pool Accounting

  • Usage is also tracked at:
    • Pool level
    • Partition level

👉 Helps enforce:

  • Fair sharing
  • Entitlement guarantees

📊 Key Metrics Derived

🔹 Entitled Utilization

  • % of guaranteed CPU actually used

🔹 Physical CPU Consumption

  • Actual CPU cycles consumed

🔹 Virtual Processor Utilization

  • How busy each vCPU is

🔹 CPU Ready Time

  • Time spent waiting for CPU

👉 Critical for detecting:

  • Overcommit issues

⚡ Example

LPAREntitlementConsumed CPUInterpretation
A2 CPUs2 CPUsFully using entitlement
B1 CPU2 CPUsBorrowing extra (uncapped)
C1 CPU0.5 CPUUnderutilized

🔗 Interaction with System Components

Scheduling

  • Data feeds into:
    • Dynamic CPU allocation
    • Load balancing decisions

VIOS Impact

  • Accurate tracking ensures:
    • Virtual I/O Server (VIOS) gets enough CPU
  • Prevents I/O bottlenecks

Performance Tools

Metrics are exposed to tools like:

  • topas
  • nmon
  • lparstat

👉 These tools read hypervisor-provided counters


🧠 Key Insight

CPU utilization tracking in PowerVM is:

time-based, hardware-assisted, and continuously updated per partition

—not just an estimate.


🎯 Why It Matters

  • Enables fair CPU sharing
  • Helps detect bottlenecks
  • Supports capacity planning
  • Ensures SLA compliance

🔑 Final Takeaway

PowerVM tracks CPU utilization per partition by:

  • Measuring actual execution time on physical CPUs
  • Using high-resolution hardware timers
  • Maintaining per-LPAR accounting counters

👉 This precise tracking is what makes dynamic scheduling, overcommit handling, and fairness possible.

Looking for servers Rental ?

Call Our Expert :


  • (call for rental enquiries)

Email us :