HEXGEN-FLOW: Optimizing LLM Inference Request Scheduling for Agentic Text-to-SQL
You Peng, Youhe Jiang, Wenqi Jiang, Chen Wang, Binhang Yuan
TL;DR
HEXGEN-FLOW addresses the challenge of efficiently serving agentic, multi-stage Text-to-SQL workloads on heterogeneous GPU clusters while meeting end-to-end SLOs in multi-tenant environments. It introduces a two-level scheduling framework—global workload-balanced dispatching and per-model adaptive urgency queues—complemented by a simulation-guided α-tuning mechanism to adapt to changing workloads. By explicitly modeling inter-stage dependencies and hardware heterogeneity, the approach achieves substantial reductions in P95 tail latency and notable throughput gains across diverse traces and hardware configurations. The results demonstrate robust performance improvements over state-of-the-art LLM serving baselines, enabling more reliable production deployment of agentic Text-to-SQL systems. This work advances practical LLM serving by aligning end-to-end latency guarantees with real-world multi-tenant, heterogeneous data-center environments.
Abstract
Recent advancements in leveraging the agentic paradigm of large language models (LLMs) have substantially improved Text-to-SQL capabilities, empowering users without specialized database knowledge to intuitively query databases. However, deploying agentic LLM-based Text-to-SQL systems in production presents significant challenges, stemming from their inherently multi-stage computational dependencies, strict latency requirements, and the complexity of deployment across heterogeneous GPUs widely existing in enterprise clusters. Meanwhile, existing LLM serving frameworks are primarily designed for independent inference tasks, resulting in suboptimal performance and frequent service-level objective (SLO) violations in Text-to-SQL workloads. In this paper, we introduce HEXGEN-FLOW, a novel framework designed explicitly to schedule and execute agentic multi-stage LLM-based Text-to-SQL workflows on heterogeneous GPU clusters serving multi-tenant Text-to-SQL requests. HEXGEN-FLOW introduces a hierarchical scheduling approach that combines global workload-balanced task dispatching with an adaptive local priority queue, guided by a systematic analysis of agentic Text-to-SQL workflows. Additionally, we propose a lightweight simulation-based method for tuning critical scheduling hyperparameters, further enhancing robustness and adaptability. Our evaluation on realistic Text-to-SQL benchmarks demonstrates that HEXGEN-FLOW significantly outperforms state-of-the-art LLM serving frameworks. Across all traces, HEXGEN-FLOW reduces P95 tail latency by $1.42{\sim}1.56\times$ and increases throughput by $1.49{\sim}1.81\times$, demonstrating robust improvements under diverse workloads. Our code is available at https://github.com/Relaxed-System-Lab/Hexgen-Flow.
