SCOOT: SLO-Oriented Performance Tuning for LLM Inference Engines

Ke Cheng, Zhi Wang, Wen Hu, Tiannuo Yang, Jianguo Li, Sheng Zhang

Abstract

As large language models (LLMs) gain popularity across web applications, optimizing service-level objectives (SLOs) for inference services is crucial for user satisfaction and cloud vendor competitiveness. We observe that LLM inference engine parameters significantly impact performance, yet optimal configurations vary across services. We propose SCOOT, an automatic performance tuning system that optimizes SLOs by jointly exploiting single- and multi-objective Bayesian optimization (BO). SCOOT prunes the search space using known constraints and a random forest model to learn hidden constraints, mitigating invalid exploration. Parallel suggestion further accelerates the tuning process. Implemented at Ant Group, SCOOT outperforms existing techniques in SLO optimization and efficiency across various engines like vLLM and TensorRT-LLM.

Introduction

Deploying LLMs at scale involves complex trade-offs. Inference engines like vLLM and TensorRT-LLM offer numerous tunable parameters (e.g., batch size, scheduling factors), but default settings are rarely optimal for specific workloads. Manual tuning is hindered by three main challenges: diverse application objectives (e.g., low latency for chatbots vs. high throughput for batch processing), hidden constraints that cause engine crashes, and the high cost of evaluating configurations through time-consuming stress tests.

Relative TTFT across different services and configurations, highlighting the sensitivity of performance and the presence of hidden constraints (Errors).

As shown in the figure above, a configuration that works for one service may lead to extreme latency degradation or even system errors in another, proving that there is no "one-size-fits-all" best practice.

Methodology: The SCOOT System

SCOOT treats inference engine tuning as a black-box optimization problem. It employs a sophisticated workflow centered on Bayesian Optimization (BO) to navigate the vast parameter search space efficiently.

The SCOOT system architecture, illustrating the Bayesian Optimization loop, Random Forest constraint learner, and parallel suggestion mechanism.

Dual-Mode Bayesian Optimization

SCOOT utilizes Single-Objective BO (SOBO) for straightforward tasks like maximizing throughput and Multi-Objective BO (MOBO) for complex trade-offs, such as balancing Time-to-First-Token (TTFT) against Time-Per-Output-Token (TPOT). This allows users to find the Pareto frontier of optimal performance.

Constraint Learning and Efficiency

To avoid configurations that cause engine crashes—often referred to as "hidden constraints"—SCOOT integrates a Random Forest model. This model learns the Probability of Feasibility (POF) from past observations, pruning the search space of "dangerous" settings before they are tested. To further reduce the evaluation bottleneck, SCOOT implements a parallel suggestion mechanism, allowing multiple configurations to be stress-tested simultaneously across a cluster.

Experimental Evaluation

SCOOT was evaluated using real-world request traces from Ant Group, covering SQL conversion, interactive chatbots (BOT), text classification (CLS), and offline recommendations (REC). Experiments were conducted on Llama-2 models using NVIDIA A10 and A100 GPUs.

Key Results

  • Throughput: Achieved up to a 68.3% improvement for recommendation tasks.
  • Tail Latency: Reduced P99 latency by up to 40.6% for classification tasks.
  • Interactive Performance: In SQL applications, TTFT was reduced by up to 99.8% and TPOT by up to 61.0% compared to default settings.
  • Tuning Efficiency: The parallel suggestion feature reduced total tuning time by approximately 50% (e.g., from 5 hours to 2.5 hours) without compromising the quality of the discovered configurations.

Conclusion

SCOOT provides a robust, automated framework for optimizing LLM inference engines. By learning hidden constraints and leveraging parallel Bayesian Optimization, it significantly improves SLOs across diverse workloads and hardware. While future work will explore model-specific optimizations like quantization, SCOOT is already delivering substantial performance gains in production environments at Ant Group.

Summary updated

BibTeX
@inproceedings{cheng2024scoot,
  author = {Ke Cheng and Zhi Wang and Wen Hu and Tiannuo Yang and Jianguo Li and Sheng Zhang},
  title = {{SCOOT: SLO-Oriented Performance Tuning for LLM Inference Engines}},
  booktitle = {The Web Conference},
  year = {2024},
}
Figure