TL;DR
This paper introduces Phoebe, an intelligent system for automatically tuning distributed stream processing (DSP) jobs. Phoebe proactively anticipates workload changes using time series forecasting to optimize resource allocation, ensuring both low latency and fast recovery from failures, while significantly reducing operational costs.
What Problem Does This Paper Address?
Modern data processing relies heavily on Distributed Stream Processing (DSP) systems to handle high-throughput, real-time event streams for time-sensitive decision-making. These systems must also guarantee data consistency, even during partial failures (e.g., exactly-once processing). A major challenge is that the workloads for these systems are often dynamic and unpredictable. Static resource configurations become inefficient, leading to either degraded Quality of Service (QoS) or wasted resources and higher costs. Manually tuning these complex systems for optimal performance and recovery is a difficult and time-consuming task, often forcing users to over-provision resources to ensure reliability.
Methods
Phoebe employs a three-phase approach:
- Profiling: It conducts parallel profiling runs of the target DSP job across various scaleout configurations and increasing workload rates. This phase quantifies the average end-to-end latency (Lavg) and the maximum processing capacity (Tmax) for each configuration.
- Modeling: Two models are built:
- Performance Model (ML): A multiple regression model predicts Lavg based on scaleout and workload. Clustering is used to identify "stable" latency ranges.
- Recovery Time Model (MR): This model estimates recovery time (R) by combining Tmax predictions (derived from profiling data) with a multi-step-ahead Time Series Forecasting (TSF) model for future workload rates.
- Optimization: Phoebe iteratively uses these models to evaluate potential scaleout configurations. It prioritizes configurations that meet the defined recovery time target (RCtar) and then selects the smallest scaleout that provides stable latencies. This proactive approach anticipates future workload changes using TSF, aiming for long-lived, accurate scaling decisions.
Datasets
The paper does not explicitly mention specific datasets used for training the models. However, it describes experiments using two benchmark applications:
- Top Speed Windowing (TSW) Experiment: A modified Apache Flink job from its repository, adapted to use Kafka for sources and sinks. Workload generation was based on the TAPAS-Cologne scenario from SUMO.
- Yahoo Streaming Benchmark (YSB) Experiment: Based on the Yahoo Streaming Benchmark, adapted to use Kafka and Redis. Workload was generated using a sinusoidal function with +/- 10% variance.
Key Insights and Ideas
- Proactive vs. Reactive Scaling: Phoebe's core innovation is its proactive approach, using Time Series Forecasting to anticipate future workload changes rather than just reacting to current conditions. This leads to more stable and long-lived scaling decisions.
- Holistic QoS Optimization: Unlike many existing solutions that focus solely on latency or throughput, Phoebe explicitly models and optimizes for both average end-to-end latency (Lavg) and recovery time (R), crucial for systems with exactly-once processing guarantees.
- "Black Box" Approach: Phoebe treats DSP jobs as black boxes, requiring minimal modification to the underlying framework, making it broadly applicable.
- Cost-Benefit of Profiling: While initial profiling incurs a cost, the paper argues that this investment is quickly recouped through significant resource savings and improved uptime over time.
- Recovery Time as a First-Class Citizen: Explicitly considering and optimizing for recovery time (R) is critical for systems requiring high availability and strict QoS guarantees, especially when dealing with failures.
Key Results
- Phoebe achieved stable end-to-end latencies comparable to an over-provisioned static configuration.
- It demonstrated significant resource utilization savings: 25.5% and 41% compared to a static over-provisioned setup in the TSW and YSB experiments, respectively.
- Recovery times for Phoebe were on average within 4.5% (TSW) and 8.5% (YSB) of the expected target, outperforming reactive and TWRES baselines which often failed to meet recovery targets.
- Phoebe significantly reduced the number of reconfigurations compared to other dynamic approaches, leading to higher uptime.
Limitations and Future Work
- Profiling Cost: While beneficial long-term, the initial profiling phase requires resources and time. The paper notes that this cost becomes less significant over longer experiment durations.
- Assumption of Live Data: The profiling phase assumes the availability of live production-like data streams for accurate workload modeling.
- Future Work: The paper suggests that further research could explore more sophisticated TSF models, investigate the impact of different failure injection strategies, and potentially extend the approach to other types of distributed systems.
Summary updated