On Queueing Theory for Large-Scale CI/CD Pipelines Optimization
Grégory Bournassenko
TL;DR
This paper addresses the optimization of large-scale CI/CD pipelines under shared infrastructure using queueing-theory methods. It starts from the classic $M/M/c$ model and extends to $M/G/c$ and $G/G/c$ to capture variability in service times and arrivals, integrating load forecasting and dynamic, cost-aware scaling. Key contributions include SMA, exponential smoothing, and ML-based demand forecasting; multi-objective cost functions with SLA constraints; task scheduling heuristics (FCFS, SPT, EDF); bottleneck analysis via Little's Law; and a case study validating the approach, plus extensions to heterogeneous runners and advanced queueing models such as $M/G/1$ and $G/G/1$. The framework provides practical guidance for achieving higher throughput and lower waiting in enterprise CI/CD systems through adaptive resource management and prioritization policies.
Abstract
Continuous Integration and Continuous Deployment (CI/CD) pipelines are central to modern software development. In large organizations, the high volume of builds and tests creates bottlenecks, especially under shared infrastructure. This article proposes a modeling framework based on queueing theory to optimize large-scale CI/CD workflows. We formalize the system using classical $M/M/c$ queueing models and discuss strategies to minimize delays and infrastructure costs. Our approach integrates theoretical results with practical techniques, including dynamic scaling and prioritization of CI/CD tasks.
