Introduction
In modern cloud infrastructure, such as Kubernetes or Azure, providers must efficiently pack containers onto physical machines to maximize resource utilization. This task is a variation of the classic Bin Packing Problem, but it is complicated by two real-world factors: the stochastic nature of container resource usage and the reality of "batch" scheduling on clusters that are already partially occupied. This paper introduces a unified approach to the Stochastic Bin Packing Problem (SBPP) by reformulating it to account for non-empty machines and fluctuating demands.
The UCaC Metric and Gaussian Modeling
To address resource uncertainty, the researchers propose a new metric: Used Capacity at Confidence (UCaC). UCaC calculates a machine's resource usage as its mean usage plus a safety margin based on its variance and a target confidence level (e.g., 99.9%). By minimizing the sum of UCaC across a cluster, the scheduler naturally leaves more room for future growth and reduces the risk of performance-degrading capacity violations.
A key technical pillar of this work is the modeling of CPU usage as Gaussian distributions. The authors argue that because a container typically handles many independent small tasks, its total CPU usage follows a Gaussian distribution according to the Central Limit Theorem. Empirical analysis of real-world traces confirms that this assumption is conservative; real-world tails often decay faster than a true Gaussian, providing a built-in safety buffer for reliability.
Algorithmic Approaches
The paper introduces three novel solvers designed to optimize the UCaC objective:
- BF-UCaC (Online): A greedy "Best-Fit" heuristic that places containers where they result in the lowest marginal increase in cluster-wide UCaC.
- BiHeu (Offline): A bi-level heuristic that sorts machines by uncertainty and containers by normalized uncertainty to optimize placement patterns.
- CSP-UCaC (Exact): A solver based on the Cutting Stock Problem (CSP) variant, using column generation to identify optimal container patterns that can fit together within capacity constraints.
Evaluation and Key Results
The methods were evaluated using both synthetic datasets and a 9-day regional trace from a major cloud provider involving over 10,000 containers. The results demonstrate that UCaC-based methods significantly outperform traditional baselines, particularly in "scale-down" scenarios where services are shrinking and consolidation is critical.
Key findings include:
- Efficiency Gains: The CSP-UCaC solver used approximately 4.5% fewer machines than the standard "n-Sigma" best-fit approach while maintaining a lower rate of resource violations.
- Risk Pooling: By optimizing for UCaC, the scheduler exploits "risk-pooling," where combining containers with different usage patterns reduces total uncertainty, allowing for denser packing without increasing risk.
- Operational Consistency: The authors mathematically prove that minimizing UCaC on empty machines is approximately equivalent to minimizing the total number of machines used, ensuring the model remains consistent with traditional bin packing goals.
Conclusion
By bridging the gap between theoretical bin packing and the operational realities of cloud scheduling, this research provides a robust framework for managing stochastic workloads. The UCaC metric and the associated solvers offer a practical path toward higher resource efficiency and improved service reliability in large-scale cloud environments.
Summary updated