Planner Guide

View as Markdown

简体中文

The Dynamo Planner is an autoscaling controller that adjusts prefill and decode engine replica counts at runtime to meet latency SLAs. It reads traffic signals (Prometheus metrics or load predictor output) and engine performance models to decide when to scale up or down.

For a quick overview, see the Planner overview. For architecture internals, see Planner Design.

Scaling Modes

The planner supports four optimization targets that determine how scaling decisions are made:

  • throughput (default): Uses static thresholds on queue depth and KV cache utilization. No SLA targets or profiling needed. Works out of the box.
  • latency: Same approach as throughput but with more aggressive thresholds — scales up earlier and tolerates less queuing. Ideal for latency-sensitive workloads.
  • load: Uses user-defined prefill queue token thresholds and decode KV utilization thresholds for reactive load-based scaling.
  • sla: Uses the Rust engine performance shim with native AIC estimates when available, plus online FPM tuning or FPM regression fallback, to target specific TTFT/ITL values. Supports both throughput-based (predictive) and load-based (reactive) scaling modes. For advanced users who need precise SLA control.

When to use which:

  • Start with throughput (the default) — it works immediately with no configuration.
  • Switch to latency if your workload has strict latency requirements and you prefer to over-provision rather than queue.
  • Use load when you want direct control through prefill queue and decode KV utilization thresholds.
  • Use sla when you want to target specific TTFT/ITL values with native AIC estimates, optional bootstrap profiling data, or live FPM warmup.

PlannerConfig Reference

The planner is configured via a PlannerConfig JSON/YAML object. When using the profiler, this is placed under the features.planner section of the DGDR spec:

1features:
2 planner:
3 mode: disagg
4 backend: vllm
5 # optimization_target defaults to "throughput" — works out of the box

For SLA-based scaling:

1features:
2 planner:
3 optimization_target: sla
4 enable_throughput_scaling: true
5 enable_load_scaling: false
6 pre_deployment_sweeping_mode: rapid
7 mode: disagg
8 backend: vllm

To evaluate Planner behavior without changing replica counts, turn on advisory mode:

1features:
2 planner:
3 advisory: true

Advisory mode is suggestion-only. The Planner computes recommended replica counts, logs them, exports them as diagnostics, and shows them in HTML reports. The recommendations are not applied as scaling decisions: the Planner does not execute scaling actions or change the deployment.

Optimization Target

FieldTypeDefaultDescription
optimization_targetstringthroughputthroughput: scale based on queue/utilization thresholds. latency: aggressive low-latency thresholds. load: user-defined prefill queue and decode KV utilization thresholds. sla: Rust engine perf model scaling with ttft_ms/itl_ms targets.

When optimization_target is throughput, latency, or load, load-based scaling is automatically enabled and throughput-based scaling is disabled. The ttft_ms/itl_ms fields are ignored.

Scaling Mode Fields (SLA mode)

FieldTypeDefaultDescription
enable_throughput_scalingbooltrueEnable throughput-based scaling. Only used when optimization_target: sla.
enable_load_scalingboolfalseEnable load-based scaling. Only used when optimization_target: sla.

At least one scaling mode must be enabled when using optimization_target: sla.

Pre-Deployment Sweeping

FieldTypeDefaultDescription
pre_deployment_sweeping_modestringrapidHow to generate optional bootstrap performance data: rapid (AIC simulation, ~30s), thorough (real GPUs, 2-4h), or none (skip).

SLA mode uses the Rust engine performance shim. If aic_perf_model is present, the planner initializes the shim with native AIC model identity and engine limits. Unsupported native AIC configs automatically fall back to observed-FPM regression in the shim. If aic_perf_model is absent, the shim starts as an FPM regression model and becomes ready after enough self-benchmark or live FPM observations.

At startup, the planner always tries to fetch self-benchmark results from the get_perf_metrics Dynamo endpoint. If unavailable, it falls back to rapid-mode AIC interpolation data or profiler-generated data (npz or JSON) at profile_results_dir when configured. These sources are converted to ForwardPassMetrics and used to tune or bootstrap the perf model. With pre_deployment_sweeping_mode: none, the planner can still start; throughput decisions report model_not_ready until native AIC is available or enough live FPMs have warmed the regression fallback.

Manual native AIC perf-model config:

1features:
2 planner:
3 optimization_target: sla
4 aic_perf_model:
5 hf_id: nvidia/Llama-3.1-8B-Instruct-FP8
6 system: h200_sxm
7 backend: vllm
8 prefill_pick: {tp: 1, pp: 1, dp: 1, moe_tp: 1, moe_ep: 1}
9 decode_pick: {tp: 1, pp: 1, dp: 1, moe_tp: 1, moe_ep: 1}

Throughput-Based Scaling Settings

FieldTypeDefaultDescription
throughput_adjustment_interval_secondsint180Seconds between throughput-based scaling decisions.
throughput_metrics_sourcestringfrontendPrometheus traffic source for throughput scaling: frontend reads dynamo_frontend_* metrics from the public Frontend; router reads dynamo_component_router_* metrics from a LocalRouter. Use router for pool-local Planner in GlobalPlanner deployments.
min_endpointint1Minimum number of engine endpoints to maintain.
max_gpu_budgetint8Maximum total GPUs the planner may allocate.
ttft_msfloat500.0TTFT SLA target (ms) for scaling decisions.
itl_msfloat50.0ITL SLA target (ms) for scaling decisions.

Load-Based Scaling Settings

FieldTypeDefaultDescription
load_adjustment_interval_secondsint5Seconds between FPM tuning updates and load-based scaling decisions. Even when only throughput scaling is enabled, live FPM observations are fed into the perf model at this interval. Must be shorter than throughput_adjustment_interval_seconds.
max_num_fpm_samplesint64Maximum retained FPM observations for online tuning or regression.
fpm_sample_bucket_sizeint16Number of buckets for observation retirement (must be a perfect square).
load_scaling_down_sensitivityint80Scale-down sensitivity 0–100 (0=never, 100=aggressive).
load_min_observationsint5Minimum observations before making scaling decisions.

General Settings

FieldTypeDefaultDescription
modestringdisaggPlanner mode: disagg, prefill, decode, or agg.
backendstringvllmBackend: vllm, sglang, trtllm, or mocker.
environmentstringkubernetesRuntime environment: kubernetes, virtual, or global-planner.
namespacestringenv DYN_NAMESPACEKubernetes namespace for the deployment.
advisoryboolfalseSuggestion-only mode. Compute, log, export, and report recommended replica counts without executing scaling actions or changing the deployment.

Traffic Prediction Settings

FieldTypeDefaultDescription
load_predictorstringarimaPrediction method for request count, ISL, and OSL: constant, arima, kalman, or prophet. Runtime metadata such as KV hit rate and speculative decode accept length uses the latest valid observation instead.
load_predictor_log1pboolfalseApply log1p transform to predicted request count, ISL, and OSL data.
prophet_window_sizeint50Window size (seconds) for Prophet predictor.
load_predictor_warmup_tracestringnullPath to a warmup trace file for bootstrapping predictions.

KV hit rate and speculative decode accept length are runtime engine/router signals, not traffic shape. The planner stores the latest valid observation for each signal and reuses it until a newer valid value arrives. On cold start, missing KV hit rate means no prefix-cache discount, and missing accept length means 1.0.

Kalman Filter Settings

FieldTypeDefaultDescription
kalman_q_levelfloat1.0Process noise for level component.
kalman_q_trendfloat0.1Process noise for trend component.
kalman_rfloat10.0Measurement noise.
kalman_min_pointsint5Minimum data points before Kalman predictions activate.

Diagnostics Reports

FieldTypeDefaultDescription
report_interval_hoursfloat or null24.0Generate an HTML diagnostics report every N hours (simulated time). Set to null to disable periodic report generation.
report_output_dirstring./planner_reportsDirectory for HTML diagnostics reports.
live_dashboard_portint8080Port for the live diagnostics dashboard HTTP server. Set to 0 to disable. When enabled, visit http://host:port/ to view a real-time Plotly report of accumulated snapshots.

The same diagnostic signals surfaced in these reports are also exported as Prometheus metrics under the dynamo_planner_* prefix—for example estimated TTFT/ITL (dynamo_planner_estimated_ttft_ms, dynamo_planner_estimated_itl_ms), recommended replica counts (dynamo_planner_predicted_num_prefill_replicas, dynamo_planner_predicted_num_decode_replicas), per-engine capacity and FPM queue depths, and load/throughput scaling decision enums.

The Replica Counts plot overlays actual prefill/decode replicas with discrete recommendation markers for the Planner’s recommended prefill/decode replicas. When advisory: true, these recommended counts are suggestions only; the Planner records what it would do without applying the change.

Scheduling / plugin pipeline

The planner runs through the builtin plugin pipeline by default. The base pipeline cadence lives under the scheduling sub-tree of PlannerConfig; plugin registration, transport, and auth settings live under plugin_registration.

FieldTypeDefaultDescription
scheduling.scale_interval_secondsfloatgcd of enabled builtin intervalsBase pipeline cadence. The pipeline wakes once per interval; each plugin’s execution_interval_seconds decides whether that plugin fires on the tick. By default, the cadence is the gcd of load_adjustment_interval_seconds and, when throughput scaling is enabled, throughput_adjustment_interval_seconds, preserving existing config fire times.
scheduling.tick_max_duration_secondsfloat30.0Outer deadline wrapping the full plugin pipeline. Exceeding it aborts the tick; the next tick runs from a clean state.
plugin_registration.transport.request_timeout_secondsfloat5.0Per-plugin RPC timeout. Plugins exceeding this raise PluginTimeoutError; the stage continues with the remaining plugins.

Existing planner fields still drive the builtin plugins:

  • load_adjustment_interval_seconds schedules builtin_load_propose, which reads FPM and worker-count observations and applies the current load-based algorithm.
  • throughput_adjustment_interval_seconds schedules builtin_load_predict and builtin_throughput_propose. The throughput proposer requires the prediction from the same tick, so it only fires when the predict plugin fires.
  • When both builtins propose targets in the same tick, load-based scaling runs after throughput-based scaling and preserves the existing behavior: throughput updates the lower-bound replicas, then load-based scaling can adjust above that floor and apply the global GPU budget clamp.
  • After the plugin pipeline finishes, the planner applies the same final min_endpoint and GPU-budget safety checks to builtin and external-plugin targets before scaling the deployment.

DGDR example

1apiVersion: nvidia.com/v1beta1
2kind: DynamoGraphDeploymentRequest
3metadata:
4 name: my-deployment
5spec:
6 model: Qwen/Qwen3-0.6B
7 features:
8 planner:
9 optimization_target: sla
10 enable_load_scaling: true
11 ttft: 200.0
12 itl: 10.0
13 pre_deployment_sweeping_mode: rapid
14 scheduling:
15 tick_max_duration_seconds: 30.0
16 plugin_registration:
17 transport:
18 request_timeout_seconds: 5.0

Integration with Profiler

When the profiler runs with planner enabled, it:

  1. Selects the best prefill and decode engine configurations
  2. Generates engine performance data (prefill TTFT vs ISL, decode ITL vs KV-cache utilization)
  3. Saves the PlannerConfig and performance data into separate Kubernetes ConfigMaps
  4. Adds the planner service to the generated DGD, configured to read from those ConfigMaps

The planner receives its config via --config /path/to/planner_config.json which is mounted from the planner-config-XXXX ConfigMap. When thorough bootstrap data is generated, profiling data is mounted from the planner-profile-data-XXXX ConfigMap.

See the Profiler Guide for the full profiling workflow and how to configure pre-deployment sweeping.

Hierarchical Deployments

If you want one public endpoint for a model but multiple private DGDs optimized for different request classes, use a hierarchical deployment:

  • one control DGD with Frontend, GlobalRouter, and GlobalPlanner
  • one or more prefill pool DGDs
  • one or more decode pool DGDs

In the current workflow, run profiling independently for each intended pool, then compose the final control DGD plus pool DGDs manually. See the Global Planner Guide.

See Also