Power Simulator
This page documents the power/control-side simulation model.
Scope
The power simulator handles:
- node power-state variables,
- RAPL/DVFS control ingestion,
- frequency ramp dynamics,
- power computation and capping,
- energy integration.
Workload execution model is documented separately in:
Per-node state
Each simulated node tracks:
CapWattsTargetThrottlePctThrottlePctFreqScalein[f_min/f_max, 1]CPUUtilin[0,1]CapSaturated
Power model
At update time:
P = P_idle + (P_max - P_idle) * util^alpha * freqScale^beta
Where:
P_idle = BaseIdleWP_max = PMaxWutil = clamp(CPUUtil, 0, 1)alpha = AlphaUtilbeta = BetaFreq
Then bounds/cap handling:
- Floor
Pto minimum20W. - Clamp requested cap to
[RaplCapMinW, RaplCapMaxW]. - If
P > cap, solve cap-feasible frequency scale:targetFreq = ((cap - P_idle) / ((P_max - P_idle) * util^alpha))^(1/beta)- lower bound
minFreqScale = FMinMHz/FMaxMHz.
- Recompute
Pwith updatedFreqScale. - Final clip:
P <= cap + RaplHeadW.
CapSaturated=true when even minimum feasible dynamic power remains above cap.
DVFS dynamics
Throttle changes are ramped, not instantaneous.
Given:
targetScale = 1 - TargetThrottlePct/100rampSec = max(0.05, DvfsRampMS/1000)dt = now - lastUpdate
Update:
FreqScale = FreqScale + (targetScale - FreqScale) * min(1, dt/rampSec)
Then:
- clamp
FreqScaleto[minFreqScale, 1], - set
ThrottlePct = round((1 - FreqScale) * 100).
Control ingestion
Supported actions:
rapl.set_power_cap_watts-> updateCapWatts(with guardrails)dvfs.set_throttle_pct-> updateTargetThrottlePctin[0,100]
Unsupported GPU actions are currently returned as blocked.
Energy integration
Simulator integrates per-node and total energy over time:
- per tick:
E += P * dt - totals are exposed via
/debug/energy
Prometheus metrics expose instantaneous state; integrated totals are debug-API JSON in current implementation.
Why this model
- reflects effect of RAPL and DVFS controls on power and effective frequency,
- couples naturally with workload simulator slowdown behavior,
- supports policy comparison by energy/throughput tradeoffs in large virtual clusters.