TL;DR
Modern distributed data processing systems struggle to efficiently handle the diverse range of workloads, from massive batch jobs to low-latency interactive queries, on shared infrastructure. Fangorn introduces an adaptive execution framework built on a novel graph model that dynamically adjusts job execution based on real-time data and cluster conditions, enabling significant improvements in both performance and resource efficiency.
What Problem Does This Paper Address?
The increasing complexity and variety of data processing workloads (e.g., relational queries, machine learning, deep learning) pose a significant challenge for distributed execution frameworks. These workloads have conflicting requirements regarding latency, resource utilization, and execution patterns. Existing solutions often lead to siloed systems, increased engineering overhead, and suboptimal performance when workloads fall outside their specialized sweet spots. Specifically, efficiently managing heterogeneous workloads on shared, multi-tenant clusters, where resource availability can fluctuate and job characteristics change dynamically, is a critical problem. The paper aims to provide a unified, adaptive framework that can handle this diversity effectively.
Methods
Fangorn's core innovation lies in its enriched graph model and adaptive execution capabilities.
- Enriched Graph Model: Unlike traditional DAGs, Fangorn's graph model annotates edges and stages with physical properties (e.g., data transportation, shuffle patterns, scheduling triggers). This allows for a more nuanced representation of diverse computation patterns, including those not strictly data-flow driven.
- Adaptive Execution: Fangorn supports dynamic adjustments to both physical and logical execution plans at runtime. This includes:
- Late Binding: Deferring decisions about physical graph properties and logical execution plans until runtime, allowing for real-time optimization based on collected statistics.
- Hybrid Execution: Seamlessly integrating long-running, pre-launched containers with on-demand resources within a single job. This allows for a flexible mix of execution strategies to balance latency and resource efficiency.
- Conditional Execution: Incorporating control and conditional stages to dynamically select optimal sub-plans based on runtime data, particularly useful for complex decisions like join algorithm selection.
- Dynamic Partition Insertion (DPI) and Adaptive Skew-Join: Techniques to automatically detect and mitigate data skew, a common cause of performance degradation, by adjusting data partitioning and distribution strategies on the fly.
- Hybrid Architecture: Fangorn employs a hybrid architecture with a Job Manager (JM) for individual job orchestration and a Fangorn Service (Admin + Multi-Graph Managers) for managing multiple jobs, especially time-sensitive ones, from a pre-launched container pool.
Datasets
The paper evaluates Fangorn using:
- TPCH Benchmark: A standard benchmark for relational database query performance, tested at 1TB scale.
- TPCx-BB Benchmark: A newer benchmark suite designed to measure comprehensive competency and performance of modern big-data systems, including relational queries and machine learning. Evaluations were performed at 1GB, 100GB, 30TB, and 100TB scales.
- Star Schema Benchmark (SSB): Used for evaluating relational engine performance at various scales.
- TPC-DS Benchmark: Another standard benchmark for decision support systems, evaluated at various scales.
- Production Workloads: The framework is extensively deployed and evaluated on Alibaba's internal production clusters, processing tens of millions of jobs daily.
Key Insights and Ideas
- The "One Size Fits All" Approach is Dead: The paper strongly argues that a single execution model cannot effectively handle the spectrum of modern data processing workloads. Adaptability is key.
- Runtime Statistics are Gold: The ability to collect and leverage real-time data statistics is crucial for making informed, dynamic execution decisions, especially for mitigating issues like data skew and optimizing complex choices like join algorithms.
- Hybrid Execution is More Than Just Resource Pooling: Fangorn's hybrid execution goes beyond simply using pre-launched containers; it's about intelligently segmenting graphs to leverage the benefits of co-scheduling for specific sub-graphs while still accommodating other parts of the job.
- Adaptive Strategies Pay Off Big Time: Techniques like adaptive skew-join and conditional execution significantly reduce job latency and improve resource utilization by tackling common, hard-to-predict problems dynamically.
- Unified Framework Simplifies Complexity: By providing a single, descriptive graph model and adaptive capabilities, Fangorn abstracts away much of the complexity of managing heterogeneous workloads, reducing engineering overhead.
Key Results
- Significant Latency Reduction:
- Adaptive Join improved join stage performance by over 10x and reduced overall job latency for TPCx-BB Q19.
- Hybrid execution on production workloads showed notable latency improvements compared to batch execution.
- Fangorn demonstrated favorable latency performance against Presto on SSB and TPC-DS benchmarks.
- Improved Resource Efficiency:
- Resource-aware hybrid execution achieved notable performance improvements with marginal increases in resource consumption compared to batch execution.
- Production workloads saw reduced overall resource consumption (CPU x time) after switching to hybrid execution.
- Deep learning inference workloads saw over 35% increase in cluster-wide GPU utilization with late binding of resource and distributed strategy.
- Scalability and Production Readiness:
- Fangorn is deployed on production clusters with over 100,000 physical machines, orchestrating over 15 million jobs daily.
- It handles job sizes ranging from one to half-million tasks.
- TPCx-BB 30TB scale performance was nearly 3x faster than the runner-up, with lower cost.
Limitations and Future Work
- Limitations:
- While Fangorn can adapt automatically, the paper acknowledges that unilateral decisions by the framework have limits.
- The effectiveness of some adaptive strategies (e.g., hybrid execution) relies on query optimizer annotations for pipelinable edges.
- The paper notes that while Fangorn is platform-agnostic, its performance is also dependent on the underlying computation engines.
- Future Work:
- Cooperative Adaptability: The authors are actively exploring ways to enable more cooperative adaptability between the execution framework (Fangorn) and computational engines. This involves coherent adjustments among various components in the distributed system, rather than Fangorn making all decisions unilaterally.
- Continued Exploration of Hybrid Execution: Further research into optimizing hybrid execution strategies and subgraph segmentation algorithms is ongoing.
- Handling Specialized Hardware: Continued work is needed to address the challenges of scheduling and optimizing workloads on specialized hardware (e.g., GPUs with NVLink) in a unified manner.
Summary updated