Abstract
Modern data analytics clusters face a dual challenge: managing complex task dependencies within Directed Acyclic Graphs (DAGs) while simultaneously optimizing multi-resource utilization. Traditional schedulers often prioritize one at the expense of the other, leading to significant performance gaps. This paper presents DAGPS, a novel scheduler that bridges this gap by identifying and scheduling "troublesome" tasks first to create an offline blueprint, which is then dynamically enforced by an online component. Experimental results show that DAGPS improves job completion times by up to 31% and achieves near-optimal performance for a majority of production workloads.
The Challenge: Dependencies vs. Resource Packing
Data analytics frameworks like Spark, Tez, and Hive represent jobs as DAGs, where nodes are tasks and edges represent data dependencies. These tasks are highly heterogeneous, requiring varying amounts of CPU, memory, and disk. Scheduling these jobs optimally is an NP-hard problem, and current production heuristics typically fall into two traps:
- Critical Path Schedulers: These prioritize tasks on the longest path to minimize latency but often ignore resource requirements, leading to fragmented cluster resources.
- Resource Packers: Systems like Tetris focus on packing tasks to maximize utilization but ignore dependencies, which can delay critical tasks and stall the entire job.
The authors observed that these sub-optimal heuristics cause production jobs to take more than twice as long as theoretically possible.
The DAGPS Approach: Do the Hard Stuff First
DAGPS addresses these inefficiencies by decoupling the scheduling problem into two distinct phases: offline blueprinting and online coordination.
Phase 1: Offline Blueprinting
When a job is submitted, DAGPS constructs a "preferred schedule" or blueprint. The core insight is to identify "troublesome tasks"—those that are either exceptionally long-running (LongScore) or difficult to pack due to high resource demands (FragScore).
By placing these troublesome tasks into the resource-time space first, DAGPS creates "holes" that smaller, more flexible tasks can fill later. To ensure dependency constraints are met, the DAG is partitioned into four sets: Troublesome (T), Parents (P), Children (C), and Others (O). These sets are scheduled in a sequence that guarantees mathematical safety and prevents dead-ends.
Phase 2: Online Coordination
In a multi-job environment, the online component manages cluster-wide resources and fairness. It calculates a perfScore for each pending task, balancing its position in the offline blueprint with current packing efficiency and job length preferences. To maintain fairness (e.g., Dominant Resource Fairness), DAGPS uses deficit counters, allowing for short-term unfairness to improve overall throughput while strictly capping the maximum deficit any job can incur.
Evaluation and Results
The system was evaluated using TPC benchmarks and 20,000 production DAGs from an enterprise Hive cluster. Key findings include:
- Job Completion Time: DAGPS improved completion times for 50% of jobs by 19% to 31% compared to Apache Tez. The top quartile of jobs saw improvements of nearly 50%.
- Cluster Throughput: Overall makespan improved by 31% over baseline Tez and 20% over state-of-the-art packers like Tetris.
- Near-Optimality: Using a new mathematical lower bound (
NewLB), the authors demonstrated that DAGPS is strictly optimal for 40% of production DAGs and within 13% of optimal for 75% of the workload.
Conclusion
DAGPS demonstrates that "doing the hard stuff first" is a powerful paradigm for cluster scheduling. By pre-scheduling troublesome tasks and using those blueprints to guide online decisions, DAGPS significantly reduces resource fragmentation and job latency. Future work includes extending these principles to network coflow scheduling and geo-distributed analytics.
Summary updated