Abstract
Cloud data centers often suffer from significant resource underutilization because applications reserve capacity based on peak demand. While CPU can be time-shared, over-provisioning memory is risky due to potential Out-Of-Memory (OOM) failures. This paper presents a data-driven system that dynamically adjusts resource allocations using real-time utilization forecasts. By leveraging Gaussian Process regression to quantify predictive uncertainty, the system maintains a dynamic safety buffer. Combined with a "pessimistic" preemption policy that prioritizes resizing elastic components, the approach reduces resource slack by up to 40% and improves application turnaround times by up to 10x without increasing failure rates.
Introduction
Modern cluster schedulers like Kubernetes or YARN typically rely on user-defined resource reservations. To avoid performance bottlenecks or crashes, users often request resources sufficient for an application's absolute peak demand. This leads to "resource slack"—idle capacity that is locked and unavailable for other tasks. While reclaiming idle CPU is relatively safe, reclaiming memory is hazardous; a sudden spike in usage can trigger an Out-Of-Memory (OOM) kill by the operating system, resulting in lost progress and wasted compute cycles. This research proposes a middle ground: a system that safely reclaims memory by accurately predicting usage and proactively managing the risks associated with prediction errors.
System Architecture
The proposed architecture integrates with existing cluster backends (e.g., Docker) to monitor and adjust allocations in real-time. It consists of four primary functional blocks: the Resource Monitor, the Utilization Forecaster, the Resource Shaper, and the Cluster State database.
The Resource Monitor collects OS-level metrics without requiring application-level changes. These metrics are fed into the Utilization Forecaster, which predicts future demand. The Resource Shaper then calculates a new allocation, adding a safety buffer to the prediction based on the model's confidence. Finally, the Application Scheduler uses the updated Cluster State to make global scheduling decisions.
Forecasting with Uncertainty
A key innovation of this work is the use of Gaussian Process (GP) regression for forecasting. Unlike standard parametric models like ARIMA, GPs provide a measure of predictive uncertainty (variance). This uncertainty is treated as a first-class feature: when the model is confident, the safety buffer shrinks to maximize reclamation; when uncertainty is high, the buffer grows to prevent OOM events.
As shown in Figure 2, while ARIMA can be competitive in specific scenarios, GP-based models provide the robust performance and uncertainty quantification needed for safe memory management. To handle the computational complexity of GPs, the authors utilize a history-dependent kernel that focuses on recent utilization patterns rather than long-term history.
Pessimistic Preemption
To further mitigate the risk of memory exhaustion, the system employs a "pessimistic" preemption policy. Distributed frameworks like Apache Spark often consist of "core" components (essential) and "elastic" workers (optional). Instead of allowing the OS to kill processes randomly during a resource crunch, the Resource Shaper explicitly preempts or resizes elastic components first. This protects the application's core state and minimizes the impact of reclamation on job completion.
Results and Discussion
The system was evaluated using large-scale simulations on Google Cluster Traces and a physical prototype on a 10-node Docker cluster.
- Simulation: The GP-based forecaster combined with pessimistic preemption improved average application turnaround times by up to 10.6x compared to static reservations. Resource slack was reduced to approximately 22%.
- Physical Prototype: In real-world tests with Spark and TensorFlow workloads, the system reduced resource slack by ~40% and cut median turnaround times by ~50%.
- Reliability: Crucially, the pessimistic preemption policy resulted in zero application failures during physical testing, demonstrating that aggressive memory reclamation can be achieved safely.
Conclusion
By treating resource utilization as a stochastic process and explicitly modeling uncertainty, this data-driven approach allows for aggressive yet safe resource reclamation in compute clusters. The combination of Gaussian Process forecasting and intelligent preemption policies offers a significant improvement over traditional static reservation systems, paving the way for more efficient and cost-effective cloud infrastructure.
Summary updated