TL;DR
This paper introduces SURE, a novel reinforcement learning-based autoscaler for streaming jobs that addresses the computational challenges of fine-grained task-level scaling. By modeling job states as spatio-temporal graphs and employing a unique subgraph sampling technique guided by mutual information, SURE significantly improves performance and reduces inference time compared to existing methods.
What Problem Does This Paper Address?
Modern applications generate massive amounts of streaming data, processed by complex systems composed of interconnected "jobs," each consisting of multiple "tasks." Efficiently managing the computational resources allocated to these tasks is crucial for maintaining Quality of Service (QoS), such as minimizing response latency and maximizing resource utilization. While fine-grained autoscaling (adjusting resources at the task level) promises better performance than coarser-grained approaches, it presents a significant challenge for streaming jobs. These jobs have dynamic workloads and complex task dependencies, requiring intensive computation to model their running states. Existing autoscaling methods, whether heuristic-based or reinforcement learning (RL)-based, struggle with this complexity, particularly when dealing with the large temporal dimensions of long-running streaming jobs. This paper aims to bridge this gap by developing an efficient and effective fine-grained autoscaler for streaming jobs.
Methods
The authors propose a novel autoscaler named SURE, built upon reinforcement learning. The core innovations lie in how they represent and process the complex state of streaming jobs:
- Spatio-Temporal Graph (STG) Modeling: The running states of streaming jobs, including task dependencies and evolving workloads, are organized into spatio-temporal graphs. This allows for a comprehensive representation of the job's dynamic behavior.
- Neural Variational Subgraph Sampler (NVSS): To overcome the computational burden of processing entire STGs, NVSS is introduced. This technique learns to sample informative subgraphs that capture the most relevant spatio-temporal features for a specific task. NVSS uses a variational inference approach to learn sampling distributions for both temporal snapshots and spatial neighbors.
- Mutual Information (MI) Objective Function: To explicitly guide the NVSS in extracting truly representative subgraphs, an objective function based on maximizing mutual information is proposed. This function encourages the sampled subgraphs to retain the most crucial topological and temporal information from the entire STG, leading to better representations.
- Graph Neural Network (GNN) and RL Integration: The sampled subgraphs are then processed by a GraphSAGE GNN to obtain task-level state representations. Finally, a reinforcement learning agent uses these representations to make autoscaling decisions (adjusting task parallelism).
Datasets
The paper uses two real-world datasets for evaluation:
- Clarknet Trace: This dataset describes HTTP requests to servers over 20,000 minutes, characterized by highly varying and periodic workloads.
- Alibaba Cluster Dataset: A subset of this dataset, specifically jobs running for over 2,000 minutes, is used to simulate long-running streaming jobs.
The authors also categorize jobs into "Small," "Medium," and "Large" settings based on the number of tasks (ranging from 6 to 46) for evaluation.
Key Insights and Ideas
- The power of subgraphs: Instead of processing the entire, massive spatio-temporal graph of a streaming job, focusing on sampled, informative subgraphs can drastically reduce computational cost without sacrificing performance. This is a key insight for handling large-scale temporal data.
- Mutual information as a guide: Explicitly using mutual information to guide the subgraph sampling process is a novel way to ensure that the sampled subgraphs are not just random subsets but are semantically rich and representative of the overall job state.
- Bridging temporal and spatial dynamics: The NVSS effectively captures the interplay between task dependencies (spatial) and workload evolution over time (temporal), which is critical for accurate autoscaling in streaming environments.
- RL for dynamic resource allocation: Reinforcement learning proves to be a powerful paradigm for learning complex, adaptive autoscaling policies that can handle the dynamic nature of streaming workloads.
Key Results
- Superior Performance: SURE consistently outperforms six competitive baselines, including heuristic-based methods (HPA), other RL-based autoscalers (DeepWave, DREAM, TVW-RL), and spatio-temporal GNNs (ASTGCN, CCRNN), across all job settings (Small, Medium, Large).
- Significant Improvement: In the "Large-1" job setting, SURE achieves a reward of 1.15, significantly higher than the best baseline CCRNN (0.45).
- Reduced Inference Time: The subgraph sampling approach leads to substantially lower inference times compared to baselines like CCRNN, while maintaining or improving performance. For instance, inference time for SURE is shown to be much less than CCRNN.
- Ablation Study Validation: An ablation study confirms the effectiveness of both the NVSS subgraph sampling and the mutual information objective function. Removing NVSS (random sampling) significantly degrades performance, while incorporating the MI objective further boosts the reward.
Limitations and Future Work
- Limitations: The paper acknowledges that while SURE achieves lower latency, it may not always simultaneously achieve optimal utilization. This is a common trade-off in resource management, where reducing latency can sometimes lead to slightly higher resource consumption. The authors also note that the performance of the sampling strategy can be sensitive to the number of sampled snapshots ($k_1$), with too many potentially introducing noise.
- Future Work: The authors suggest applying their method to other spatio-temporal graph modeling tasks that also suffer from large temporal dimensions, such as traffic forecasting and pose detection. This indicates a broader applicability of their core techniques.
Summary updated