---
title: SLO-Aware Dynamic Frequency Scaling
url: https://www.emergentmind.com/topics/slo-aware-dynamic-frequency-scaling
type: topic
---

# SLO-Aware Dynamic Frequency Scaling

Service-Level Objective (SLO)-aware Dynamic Frequency Scaling (DFS) refers to runtime adaptation of processor or accelerator frequency and voltage parameters, subject to domain-appropriate performance constraints formulated as SLOs. These techniques balance energy efficiency with strict guarantees on response time, throughput, or other user-facing metrics. Recent work extends classic DVFS (Dynamic Voltage and Frequency Scaling) by fusing profiling, online inference, and feedback control with SLO compliance, achieving significant energy reduction in both CPU and modern GPU contexts.

## 1. Fundamental Concepts

SLO-aware DFS operates by dynamically tuning hardware performance parameters (for CPUs: voltage/frequency, for GPUs: Streaming Multiprocessor clocks and engine parallelism) so that specified SLOs—e.g., maximum allowable average or tail latency per request, or minimal tokens per second—are never violated. SLOs are typically formalized as upper bounds on response time percentiles (such as p99 for end-to-end latency, or per-iteration time between tokens in LLM inference) and are dictated by application semantics or user experience constraints.

DVFS techniques, when applied naïvely, risk breaching performance constraints or incurring excessive runtime overhead. SLO-aware strategies avoid this via predictive modeling, fine-grained phase detection, and admission and adaptation protocols that always guarantee SLO adherence. 

## 2. Methodological Approaches

SLO-aware DFS methodologies span several key strategies:

1. **Profiling and Modeling:**  
   – For CPU systems (e.g., [1904.07813]), profiling captures phase-dependent metrics such as memory-accesses-per-instruction (MAPI). Offline characterization across all P-states produces look-up tables (LUTs) that map workload features to "safe" frequencies under bounded slowdown.  
   – For GPU-based LLM inference ([2408.05235], [2508.16449]), system-specific microbenchmarks are used to fit latency and power models as a function of frequency, engine size, and working set (e.g., KV-cache footprint, batch size).

2. **Prediction and Admission Control:**  
   – Workload phases are dynamically profiled. Predictive models (e.g., XGBoost regressors for per-iteration throughput in "throttLL'eM" [2408.05235]) or latency–power polynomials (in GreenLLM [2508.16449]) forecast the effect of DFS actions before they are applied.  
   – At admission, new queries are simulated at maximum frequency to preempt SLO violations; only after passing the SLO checks are they subject to frequency reduction attempts.

3. **Fine-Grained, Feedback-Driven Adjustment:**  
   – Timeslice partitioning: CPU workloads adapt the frequency at sub-second granularity (10–100 ms timeslice) based on recent MAPI history, maintaining per-slice and cumulative slowdown within user-set SLOs [1904.07813].  
   – GPU LLM serving splits control across prompt (“prefill”) and decode phases. Prefill frequencies are assigned for prompt length classes by solving energy minimization under queuing-based tail-latency constraints [2508.16449]. Decode employs a dual-loop controller: coarse-grained throughput bucketing, and a fine-grained feedback loop tracking p95 time-between-tokens (TBT), with hysteresis and sub-20 ms correction lags.

4. **Discrete Search and Controller Design:**  
   – For fast search over discrete frequency settings, binary search is commonly applied (as in "throttLL'eM" [2408.05235]) since the performance-energy feasible set is unimodal for a single SLO.  
   – Controllers exploit workload characteristics: for memory-bound decode loops, frequency can be throttled aggressively, whereas compute-bound prefill requires maintaining higher clocks.

## 3. Algorithmic Foundations and Formulations

The core of SLO-aware DFS algorithms is the mapping from phase or workload metrics to frequency settings, subject to SLO constraints. Canonical examples:

### CPU Timeslice Mapping ([1904.07813])
- **Profiling:** Offline mapping $($MAPI, slowdown$)$ at each P-state.
- **Runtime Algorithm:**  
  For timeslice $i:\Delta$,
  1. Predict MAPI using last $n$ observations.
  2. Select $f_{sel}$ from LUT ensuring projected cumulative slowdown $<$ SLO; if not, increment $f_{sel}$.
  3. Enact frequency change (via privileged register write).
  4. Monitor overhead: control actions introduce $<$1% runtime penalty.

- **Mathematical Model$:$
  $$ t(f) = t_{on} \cdot \frac{f_{max}}{f} + t_{off} $$
  $$ P(f, V) = P_{stat} + C \cdot V^2(f) \cdot f $$
  $$ E(f) = P(f, V(f)) \cdot t(f) $$

### LLM Serving with Iteration-Level Control ([2408.05235])
- **Performance constraints:**
  - TBT SLO: $\frac{1}{IPS(j)} \leq \text{TBT}_{SLO}$
  - E2E SLO: $\sum_{k=current}^j \frac{1}{IPS(k)} + t_{cur} \leq t_{dead}(q_i)$

- **Autonomous Throttling:**
  - For new queries at $f_{max}$, simulate with ML-based IPS predictors.
  - Binary search over $f$ to identify the minimal setting that meets all SLOs.
  - All frequency changes are accompanied by explicit prediction of future batch size and KV-cache demand via scoreboard projection.

### Two-Stage LLM Phase-Aware DVFS ([2508.16449])
- **Prefill Optimization:**
  - Service time model: $t^{ref}(L) \approx aL^2 + bL + c$, $t(L;f) = t^{ref}(L) \frac{f_{ref}}{f}$
  - Power: $P(f) = k_3f^3 + k_2f^2 + k_1f + k_0$, $E_{active}(f) = P(f) \cdot \text{busy}(f)$
  - Optimization: $\min_{f} E_{total}^{(c)}(f)$ s.t. $\text{busy}^{(c)}(f) \leq D_c$
  
- **Decode Dual-Loop Controller:**
  - Coarse (200 ms): Bucket throughput, map to a frequency band.
  - Fine (20 ms): Track TBT p95, ramp frequency up if $m_{TBT}>1.0$, ramp down if $m_{TBT}<0.65$.

## 4. Empirical Results and Practical Impact

Multiple studies report measurable success for SLO-aware DFS:

| System                 | Workload                        | Energy Savings (%) | SLO Miss (%) | Perf. Loss (%) / Comments             |
|------------------------|----------------------------------|-------------------|--------------|---------------------------------------|
| CPU Timeslice [1904.07813]        | NAS NPB (CG, FT, MG, SP)           | 4–7              | 0            | All perf. loss $<$3% (mean 2.4%)      |
| throttLL'eM [2408.05235]          | LLM inference (Azure 60-min trace) | 24.7–43.8        | 0            | 1.71–1.78$\times$ energy efficiency   |
| GreenLLM [2508.16449]             | LLMs (Alibaba/Azure traces)        | 6–34             | $<$3.5       | TTFT, TBT pass rates $\gtrsim$96%     |

In [1904.07813], per-timeslice overhead for control logic is measured at $<$0.2% per slice (DVFS transition $10$–$20\,\mu$s; perf counter read $1\,\mu$s), making the approach scalable to fine-grained adaptation on CPU-based systems. In GPU LLM serving, SLO-aware DFS strategies outperform default hardware governors—GreenLLM demonstrates up to 34% total GPU energy reduction purely by separating phase treatment and tightly controlling per-request power delivery [2508.16449]. Importantly, the incidence of SLO violation is not significantly increased; TTFT and TBT pass rates remain $\gtrsim$96%, even at high load or during token generation phases.

## 5. System-Specific Design Considerations

### Phase Awareness
- In LLM inference, differential control per phase (prefill vs. decode) is crucial. The prefill phase, compute-bound and latency-critical, is optimized via static SLO-constrained frequency choices determined by an analytic queueing and latency-power model. Decode, being memory-bound with unpredictable length, admits more aggressive, fine-grained throttling and real-time feedback.

### Predictor and Model Selection
- Lightweight regression (e.g., XGBoost, as chosen in [2408.05235]) outperforms black-box neural networks when inference must be low-latency.
- For simpler CPU tasks, direct metric-to-frequency lookup tables suffice, provided hardware phase-change behavior is well-characterized.

### Overhead Management
- Control actions (DVFS frequency/voltage changes and monitoring counter reads) are amortized over timeslice or token window durations, ensuring total system overhead remains an order of magnitude below 1% of runtime.

### Scalability and Applicability
- These techniques are naturally extensible to exascale or multi-engine contexts (as in per-core or per-GPU DFS), provided per-task frequency domains are hardware-exposed.
- Queueing-aware and percentile-based SLO mechanisms facilitate generalization beyond single request-average latency to p99 or more sophisticated service constraints.

## 6. Limitations and Future Directions

Several limitations are documented:
- Offline mapping or profiling in CPUs ([1904.07813]) couples the method to the specific hardware and workloads used during characterization; dynamic workload changes are less well tolerated.
- For memory-bound phases, the performance–energy decoupling becomes less predictable; tuning for minimal energy can underexploit compute-bound slices, leaving some efficiency gains untapped.
- Addressing complex SLOs (e.g., multi-tenant fairness, soft real-time, or percentile-based latency targets) may require hierarchical or per-task enforcement logic, potentially incorporating model-based or RL predictors.

Promising extensions include on-the-fly phase model fitting, exploitation of richer hardware metrics (IPC, cache miss rates), multi-level coordination across memory and network DVFS domains, and further splitting control to sub-modules (e.g., separate SM cluster clocks on future GPUs) [1904.07813, 2508.16449]. Increased DFS granularity and hybrid model feedback (classical control + ML) are anticipated to enable even tighter SLO compliance with minimal energy.

## 7. Broader Significance

SLO-aware DFS exemplifies a transition toward tightly-coupled, model-driven, and user-centric power optimization frameworks for modern AI and HPC serving scenarios. These designs enable substantive energy reduction (often above 30%) without sacrificing mission-critical SLO adherence. The separation of phase treatment in workloads with distinct compute/memory characteristics—highlighted by GreenLLM’s dual-pool architecture—is increasingly relevant in the context of LLM inference and other deep learning serving systems. As new hardware generations expose finer-grained DFS controls and telemetry, these approaches are poised for further sophistication and broader deployment [2508.16449, 2408.05235, 1904.07813].

Source: https://www.emergentmind.com/topics/slo-aware-dynamic-frequency-scaling