Virtual processor (VP) mapping in IBM Power Systemsβmanaged by the hypervisor in PowerVMβhas a direct, measurable impact on performance because it determines how your LPARβs virtual CPUs are scheduled onto physical cores.
Think of it as: how efficiently your workload gets real CPU time.
π§ What is Virtual Processor Mapping?
-
Each LPAR is assigned:
-
Entitled capacity (guaranteed CPU fraction)
-
Virtual processors (VPs) = number of runnable threads it can use
-
The hypervisor maps these VPs β physical cores using a scheduler.
βοΈ How Mapping Affects Performance
1. Run Queue Contention (Too Many VPs)
If you assign more VPs than needed:
-
Many VPs compete for limited physical cores
-
Leads to:
-
Higher context switching
-
Longer wait time in dispatch queue
π Result: Lower performance despite βmore CPUsβ
2. Under-Provisioning (Too Few VPs)
If VPs are too low:
-
Workload cannot fully utilize available CPU capacity
-
Threads get serialized
π Result: CPU bottleneck
3. Entitlement vs VP Ratio
Key relationship:
Example:
-
Entitlement = 2.0 cores
-
VPs = 4
π Behavior:
-
Can use up to 4 cores when available (uncapped mode)
-
But guaranteed only 2 cores
Impact:
-
Good for burst workloads
-
But too many VPs β scheduling overhead
4. Capped vs Uncapped Partitions
πΉ Capped
-
Cannot exceed entitled CPU
-
Extra VPs provide no benefit
π Too many VPs = wasted overhead
πΉ Uncapped
-
Can borrow CPU from shared pool
-
More VPs allow higher burst capacity
π But:
-
If all LPARs compete β contention increases
5. Processor Affinity (Locality Matters)
The hypervisor tries to keep a VP on the same physical core:
-
Improves:
-
Cache reuse (L1/L2/L3)
-
TLB efficiency
π If mapping changes frequently:
-
Cache misses increase
-
Performance drops
6. SMT (Simultaneous Multithreading) Interaction
POWER CPUs support SMT (e.g., SMT-4, SMT-8):
-
Multiple VPs can share a single core
-
If overloaded:
-
Threads compete for execution units
π Result:
-
Throughput may increase
-
But per-thread performance may drop
7. Dispatch Latency
Hypervisor schedules VPs using dispatch queues:
-
Too many VPs β longer wait time
-
Affects:
-
OLTP latency
-
Real-time workloads
8. Workload Type Sensitivity
πΉ CPU-bound workloads
-
Sensitive to VP overcommit
-
Need tight VP-to-core mapping
πΉ I/O-bound workloads
-
Can tolerate more VPs
-
Often benefit from burst capability
π Performance Scenarios
β
Optimal Mapping
-
VP β entitlement Γ 1β2
-
Balanced scheduling
-
Good cache locality
β Over-Mapping (Too Many VPs)
-
High context switching
-
Cache thrashing
-
Increased latency
β Under-Mapping
-
CPU underutilization
-
Thread starvation
π Best Practices
πΉ 1. Right-Size VPs
πΉ 2. Monitor Key Metrics
-
Run queue length
-
CPU wait time
-
Entitlement utilization
πΉ 3. Use Uncapped Wisely
-
Good for variable workloads
-
Avoid overcommitting shared pool
πΉ 4. Tune for Cache Affinity
-
Avoid frequent VP resizing
-
Keep workloads stable
πΉ 5. Match Workload Type
-
OLTP β fewer, stable VPs
-
Batch β more VPs allowed
π§© Simple Analogy
Imagine a classroom:
-
Physical cores = chairs
-
Virtual processors = students
π Too many students (VPs):
-
Fighting for chairs β chaos (context switching)
π Too few students:
-
Empty chairs β wasted resources
π Perfect balance:
-
Everyone seated efficiently β best performance
π₯ Key Insight
Performance is not about how many virtual processors you assignβ
itβs about how efficiently they map to real hardware at runtime