TL;DR
This paper introduces Demeter, an intelligent system that dynamically optimizes the configuration of distributed stream processing (DSP) jobs to maximize resource efficiency while maintaining high performance. By combining time-series forecasting for workload prediction with multi-objective Bayesian optimization for parameter tuning, Demeter significantly reduces operational costs and improves efficiency in dynamic cloud environments.
What Problem Does This Paper Address?
Distributed Stream Processing (DSP) systems are designed to handle massive, continuous data streams in near real-time. To cope with fluctuating data volumes and ensure quality of service (QoS), these systems often employ dynamic scaling. However, finding the optimal configuration for multiple parameters (like the number of workers, CPU allocation, memory, and checkpointing intervals) is a significant challenge. Static configurations can lead to over-provisioning (wasting resources and money) or under-provisioning (degraded performance and service loss). Manually tuning these parameters is time-consuming and impractical, especially in dynamic environments where workloads change unpredictably. Existing adaptive methods often focus on single parameters or are reactive, leading to suboptimal resource utilization and potential service disruptions.
Methods
Demeter tackles this challenge with a proactive, multi-parameter optimization approach. Its core components are:
- Time Series Forecasting (TSF): Uses an online ARIMA model to predict future workload rates. This allows Demeter to anticipate changes and prepare for them.
- Multi-Objective Bayesian Optimization (MOBO): Models the complex relationships between various configuration parameters, workload rates, and performance metrics (latency, recovery time, resource usage). It aims to find configurations that minimize resource usage while satisfying latency and recovery time constraints.
- Profiling: When MOBO models lack sufficient data for a predicted workload, Demeter initiates short, parallel profiling runs. These runs explore different configurations to gather crucial performance data, maximizing "knowledge gain" to improve model accuracy.
- Rank-Weighted Gaussian Process Ensembles (RGPE): Used to combine multiple MOBO models, each trained on different workload segments, to create a more robust and adaptable model for diverse workload patterns.
Demeter operates iteratively, first predicting workloads, then deciding whether profiling is needed. If not, it proceeds to optimization, adjusting configurations based on its learned models. If a configuration is insufficient or new workload patterns emerge, it can revert to a safe, maximum resource configuration (Cmax).
Datasets
The paper does not introduce new datasets but utilizes existing benchmarks for evaluation:
- Yahoo Streaming Benchmark (YSB): A benchmark simulating an advertisement job, using a click-through rate dataset to generate an 18-hour workload with high variability and no discernible long-term trend.
- Top Speed Windowing (TSW) Experiment: A DSP job derived from the Apache Flink repository, using the SUMO simulation tool to generate a 24-hour workload (reduced to 18 hours) with a clear seasonal pattern and a weak upward trend.
Key Insights and Ideas
- Proactive Optimization is Key: By predicting workloads, Demeter can prepare for changes, avoiding reactive adjustments that can disrupt service and lead to suboptimal configurations.
- Multi-Parameter Optimization Matters: Focusing on a single parameter is insufficient. Demeter's ability to tune multiple interdependent parameters (workers, CPU, memory, slots, checkpoint interval) is crucial for holistic resource efficiency.
- Intelligent Profiling Reduces Overhead: Instead of constant profiling, Demeter intelligently decides when to profile based on model confidence, minimizing the overhead associated with data gathering.
- Balancing Efficiency and QoS: Demeter's core objective is to improve resource efficiency without sacrificing performance (latency) or reliability (recovery time), demonstrating that these goals are not mutually exclusive.
- The "Safety Buffer" for Stability: The safety buffer (SB) hyper-parameter is a clever way to avoid configurations that are just good enough, providing a margin of error to handle transient cluster fluctuations and prevent unnecessary reconfigurations.
Key Results
Demeter demonstrated significant improvements in resource efficiency while maintaining comparable performance to a static, over-provisioned configuration:
- Latency: Demeter achieved near-optimal latencies in approximately 95% of cases for the YSB experiment and over 95% for the TSW experiment, matching or exceeding state-of-the-art methods.
- Recovery Time: Demeter's recovery times were very close to the static baseline (3.21% deviation in YSB, 5.17% in TSW), significantly outperforming Flink Reactive and DS2, which showed much larger deviations.
- Resource Usage: Compared to the static configuration, Demeter achieved a 7% CPU and 32% memory saving in YSB, and a 3% CPU and 35% memory saving in TSW (after accounting for profiling costs). This highlights its effectiveness in memory-intensive workloads.
- Reconfigurations: Demeter initiated significantly fewer reconfigurations than Flink Reactive and DS2, leading to more stable operation.
Limitations and Future Work
- Initial Profiling Overhead: While Demeter intelligently profiles, initial runs might still incur some overhead as models are trained. The paper suggests that with further execution, the need for profiling decreases, and efficiency increases.
- "Reasonable" Workload Assumption: The paper defines "reasonable" workloads as those within an upper bound determined by expert knowledge. Handling extreme, unforeseen workload spikes might still pose a challenge.
- Future Work: The authors suggest that extending the experiment duration would allow for more profiling and further optimization, potentially leading to even greater resource savings. They also note that Demeter's efficiency would likely increase over time as its models become more accurate.
Summary updated