
GPU resource allocation for LLM inference presents complex optimization challenges. Workloads exhibit variable request patterns, unpredictable sequence lengths, and strict latency requirements, making static GPU allocation inefficient. Overprovisioning wastes expensive compute resources, while underprovisioning violates service level agreements (SLAs) and degrades user experience.
NVIDIA Dynamo's SLA Planner automates GPU resource management through SLA-driven profiling and intelligent autoscaling. The planner analyzes performance requirements (time-to-first-token, inter-token latency), profiles workload characteristics, and dynamically adjusts GPU worker replicas to meet latency targets while minimizing resource consumption. It integrates with Prometheus for metrics collection and uses predictive models (ARIMA, Kalman filter, Prophet) to forecast load patterns and proactively scale resources.
This guide covers the deployment of Dynamo's SLA Planner on Kubernetes, including infrastructure setup with Prometheus monitoring, DynamoGraphDeploymentRequest (DGDR) configuration for automated profiling and deployment, and Grafana dashboard integration for visualizing scaling decisions and performance metrics.
Before you begin, ensure you:
This deployment uses several components that work together to provide automated GPU resource planning.
NVIDIA Dynamo Platform provides the orchestration layer with the Dynamo Operator that manages DynamoGraphDeployment (DGD) and DynamoGraphDeploymentRequest (DGDR) resources. The operator automates the profiling, configuration generation, and deployment lifecycle.
SLA Planner acts as the autoscaling controller that monitors inference metrics from Prometheus and adjusts worker replica counts to meet SLA targets. It uses load predictors (constant, ARIMA, Kalman, or Prophet) to forecast request rates and sequence lengths, then calculates optimal GPU allocations based on TTFT (time-to-first-token) and ITL (inter-token latency) requirements.
DynamoGraphDeploymentRequest (DGDR) serves as the declarative interface for deploying models with performance constraints. Users specify the model name, backend type (vLLM, SGLang, or TensorRT-LLM), SLA targets, and container images. The operator automatically profiles the configuration and generates an optimized DynamoGraphDeployment.
DynamoGraphDeployment (DGD) defines the low-level implementation details for a deployed model, including frontend services, prefill workers, decode workers, and the SLA planner component. The DGDR controller automatically generates DGDs with optimized tensor parallelism configurations, resource allocations, and scaling parameters based on profiling results.
Prometheus collects inference metrics from the Dynamo frontend, including request counts, TTFT, ITL, input sequence length (ISL), and output sequence length (OSL). The planner queries these metrics every adjustment interval to make scaling decisions.
Grafana visualizes planner decisions, worker counts, GPU usage, observed metrics versus predicted metrics, and correction factors. The Dynamo Planner Dashboard provides real-time visibility into autoscaling behavior.
Before deploying the Dynamo Platform, confirm that your Kubernetes cluster has GPU nodes with allocatable resources. The platform requires accessible GPUs for both the profiling phase and ongoing inference workloads.
List GPU nodes in your cluster.
The output displays nodes with available GPUs.
Verify GPU resources are allocatable.
The output displays allocatable GPU counts for each node. Ensure at least one node shows nvidia.com/gpu: 1 or higher under the Allocatable section.
The Dynamo Operator uses node labels to identify GPU-enabled nodes for scheduling inference workloads. Apply the required label to all GPU nodes in your cluster to enable proper resource discovery.
Check if GPU nodes are already labeled.
If the output displays nodes with the nvidia.com/gpu.present=true label, skip to the next section. If no output appears, proceed with labeling.
Identify your GPU nodes.
The output lists all cluster nodes.
Label each GPU node with the Dynamo GPU label. Replace NODE_NAME with your GPU node name.
Repeat this command for each GPU node in your cluster.
Verify the labels were applied.
The output displays nodes with the GPU label.
The Dynamo repository includes a pre-deployment validation script that checks your cluster's configuration against platform requirements. Run this script to identify and resolve issues before installation.
Clone the Dynamo repository if you haven't already.
Check out the latest stable release. Visit the Dynamo releases page to find the latest version.
Run the pre-deployment check script.
The script validates kubectl connectivity, default StorageClass configuration, GPU resources, and GPU Operator installation.
If any checks fail, review the error messages and resolve the issues before proceeding.
Prometheus serves as the metrics backbone for Dynamo's autoscaling. The SLA Planner queries Prometheus for real-time inference metrics to make scaling decisions.
Add the Prometheus Helm repository.
Install the kube-prometheus-stack with configuration for Dynamo metric scraping.
The configuration enables Prometheus to scrape PodMonitor resources from all namespaces, allowing it to collect metrics from Dynamo frontend services.
Verify Prometheus is running.
The output displays the Prometheus server pod in the Running state.
The Dynamo Platform provides the core orchestration components for SLA-driven inference deployments. This installation includes Custom Resource Definitions (CRDs) for DGD and DGDR resources, the Dynamo Operator for lifecycle management, Grove distributed runtime, and the KAI scheduler.
Set environment variables for the installation.
Navigate to the home directory.
Fetch the Dynamo CRDs Helm chart.
Install the CRDs.
The command installs the Custom Resource Definitions required for Dynamo deployments.
Fetch the Dynamo Platform Helm chart.
Install the Dynamo Platform with the operator enabled and Prometheus endpoint configured.
The command configures the following components:
--namespace ${NAMESPACE} and --create-namespace: Installs the platform in the dynamo-system namespace, creating it if it doesn't exist.--set dynamo-operator.controllerManager.manager.image.tag=0.9.0: Specifies the Dynamo Operator version that manages DGD and DGDR lifecycle operations.--set grove.enabled=true: Enables Grove, the distributed runtime that coordinates communication between frontend and worker services.--set kai-scheduler.enabled=true: Enables the KAI (Kubernetes AI) scheduler for advanced GPU scheduling and resource allocation.--set nats.reloader.image.tag=0.22.3: Specifies the NATS configuration reloader version that automatically reloads NATS server configuration changes without downtime.--set prometheusEndpoint=...: Configures the SLA Planner to query inference metrics from the Prometheus service in the monitoring namespace.If the installation fails with a Grove webhook certificate conflict error, uninstall the release and reinstall:
Then run the installation command again. The warning "tls: failed to find any PEM data in certificate input" is harmless and can be ignored.
Verify the operator is running.
The output displays the operator pod in the Running state.
Dynamo deployments require authentication credentials for pulling container images from NVIDIA NGC and downloading models from Hugging Face. Create Kubernetes secrets to store these credentials securely.
Export your NGC API key. Replace YOUR_NGC_API_KEY with your NGC API key from the NGC portal.
Export your Hugging Face token. Replace YOUR_HF_TOKEN with your Hugging Face access token.
Create a Docker registry secret for NGC access using the exported variable.
Create a Hugging Face token secret for model downloads using the exported variable.
The AI Configurator performs offline profiling to generate optimal deployment configurations without running actual workloads. The aicSystem parameter specifies your GPU hardware type, and the aicBackendVersion parameter specifies the inference backend version for profiling data.
For the most up-to-date version information and supported features, refer to the AI Configurator supported features documentation.
The AI Configurator supports the following GPU systems:
Each GPU system and backend combination has specific supported versions based on pre-profiled performance data.
Example configuration for vLLM:
Example configuration for SGLang:
Example configuration for TensorRT-LLM:
Match your configuration to your cluster's GPU hardware:
kubectl describe nodes to check GPU model information.If you attempt to use an unsupported combination, the profiling job will fail with an error indicating no profiling data is available for that configuration.
DynamoGraphDeploymentRequests (DGDRs) provide a declarative interface for deploying models with specific performance targets. Specify your latency requirements—TTFT and ITL—and the operator automatically profiles the workload using AI Configurator to generate an optimized deployment configuration.
Create a DGDR manifest file with SLA specifications for the NVIDIA Nemotron Nano 4B model using the vLLM backend.
The manifest specifies:
autoApply: false allows you to review and modify the generated DGD configuration before deployment.AI Configurator System Selection: The aicSystem parameter must match your GPU hardware type. Available options are: a100_sxm, b200_sxm, gb200_sxm, h100_sxm, h200_sxm, and l40s. The aicBackendVersion parameter must match the available version for your selected system and backend combination. For vLLM backend: H100/H200 SXM supports version 0.12.0. For SGLang: H100/H200 SXM and B200 SXM support version 0.5.6.post2, L40S supports 0.5.5.post3. For TensorRT-LLM: consult the AI Configurator documentation for supported versions.
Apply the DGDR manifest.
Monitor the DGDR status.
The DGDR transitions through states: Pending → Profiling → Ready. The profiling phase with AI Configurator completes in approximately 20-30 seconds. Since autoApply: false, the operator does not automatically create the DGD.
View detailed DGDR status and events.
The output displays profiling results and the generated DGD configuration in the status.generatedDeployment field.
The profiling process produces an optimized DynamoGraphDeployment (DGD) stored in the DGDR status. Before deployment, extract this configuration and add required environment variables for Grove distributed runtime coordination and the --trust-remote-code flag for worker services.
Extract the generated DGD configuration to a file.
Add required Pod metadata environment variables and the --trust-remote-code flag to worker services using jq. These modifications enable Grove distributed runtime coordination and allow worker services to load models with custom code.
The command pipes the DGD configuration through jq to inject Pod metadata environment variables into all services and add the --trust-remote-code flag only to worker service arguments (VllmPrefillWorker and VllmDecodeWorker), saving the result to a new file.
Apply the modified DGD configuration to deploy the model.
The operator creates the frontend, prefill workers, decode workers, and planner components.
Verify the DynamoGraphDeployment was created.
The output displays the deployed DGD resource.
Check the frontend and worker pods are running.
The output displays frontend, prefill worker, decode worker, and planner pods in the Running state. Wait until all pods show Running status before proceeding.
Initial deployment may take several minutes as worker pods download the model and load it into GPU memory. Deployment time varies based on model size—larger models require more time. Monitor pod status with kubectl get pods -n ${NAMESPACE} -w to track progress.
Verify the deployment works correctly by sending a test inference request to the frontend service. Use port-forwarding to expose the service locally and send a chat completion request through the OpenAI-compatible API.
Get the frontend service name.
The output displays the frontend service.
Forward the frontend service to your local machine.
The command forwards port 8000 from the frontend service to localhost:8000. Keep this terminal session running.
In a new terminal, send a test inference request.
The command sends a chat completion request to the model. The frontend routes the request through the disaggregated prefill and decode workers, and returns the generated response.
Press Ctrl+C in the port-forward terminal to stop forwarding.
Production Deployments: Port-forwarding is suitable for local testing only. For production deployments with secure external access, configure Gateway API with TLS encryption to expose the frontend service with HTTPS ingress, load balancing, and certificate management.
The Dynamo Planner Dashboard provides real-time visualization of autoscaling behavior, including worker replica counts, GPU utilization, observed metrics versus predictions, and correction factors.
Apply the Grafana dashboard ConfigMap.
Expose the Grafana service using a NodePort for quick testing.
NodePort is for testing only. For production deployments with secure external access, configure Gateway API with TLS encryption to expose Grafana with HTTPS ingress and certificate management.
Get the NodePort assigned to Grafana.
The output displays the port number (e.g., 31234).
Retrieve the Grafana admin password.
The output displays the password. Note this for the next step.
Access Grafana in your browser. Replace NODE_IP with your cluster node's IP address and NODE_PORT with the port from the previous step.
Log in with username admin and the password retrieved in the previous step.
Navigate to Dashboards → Dynamo Planner Dashboard to view planner metrics.
The SLA Planner automatically scales GPU workers based on incoming inference traffic without manual intervention. The planner continuously monitors request rates, input/output sequence lengths, TTFT, and ITL metrics from Prometheus, then adjusts prefill and decode worker replicas every adjustment interval (30 seconds in this configuration) to meet SLA targets.
As your application receives inference requests, the planner:
The planner scales up when request rates increase or sequence lengths grow, and scales down during periods of low traffic to minimize GPU consumption while maintaining SLA compliance.
The Dynamo Planner Dashboard displays real-time autoscaling behavior and performance metrics.
The dashboard visualizes:
Use the Namespace dropdown at the top of the dashboard to filter metrics for your specific deployment namespace (dynamo-system in this guide).
View planner decision logs to understand scaling actions in detail.
The logs display real-time scaling decisions with observed metrics, predictions, and replica calculations.
The planner logs every adjustment interval, showing observed metrics from Prometheus, load predictions, and replica adjustment decisions. As inference requests arrive, the planner scales worker replicas to meet SLA targets. Press Ctrl+C to stop following the logs.
The SLA Planner uses load predictors to forecast future request patterns and proactively scale resources. Choose from four prediction models—constant, ARIMA, Kalman, or Prophet—based on your workload characteristics and traffic patterns.
The constant predictor assumes the next interval's load equals the current load. Use this for stable workloads with long adjustment intervals.
The ARIMA predictor uses auto-ARIMA to fit optimal model parameters for time-series data with trends and seasonality.
The loadPredictorLog1p parameter models log1p(y) instead of raw values, improving accuracy for request count predictions.
The Kalman predictor provides fast online forecasting with smooth adaptation using a local linear trend Kalman filter.
Tunable parameters control responsiveness to new observations versus trust in historical trends.
The Prophet predictor handles complex seasonal patterns and trend changes using Facebook's Prophet model.
You have successfully deployed NVIDIA Dynamo's SLA Planner for automated GPU resource optimization. The planner uses declarative DGDRs to specify performance requirements, automatically profiles workload characteristics, and dynamically adjusts worker replicas to meet SLA targets while minimizing GPU consumption. Prometheus integration provides metrics visibility, Grafana dashboards visualize scaling decisions, and load predictors enable proactive resource allocation based on traffic patterns. For advanced configurations, including custom load predictor parameters, manual deployment control, and virtual deployment modes, refer to the official Dynamo Planner documentation.
0 Comments
Be the first to comment and share your perspective with the community.