TL;DR
Apache Hadoop YARN is a fundamental redesign of Hadoop's resource management and job scheduling architecture. It decouples resource management from specific programming models (like MapReduce), enabling greater flexibility, scalability, and efficiency for a wider range of distributed applications. This shift has led to significant improvements in resource utilization and the ability to run diverse workloads on the same cluster.
What Problem Does This Paper Address?
The original Apache Hadoop MapReduce architecture was tightly coupled to its programming model and had a centralized job control flow. This design, while effective for its initial purpose (processing web crawls), became a bottleneck as Hadoop's adoption grew. Two key shortcomings emerged:
- Tight Coupling: Developers were forced to "abuse" the MapReduce model for tasks it wasn't designed for, leading to complex workarounds and inefficient resource usage.
- Centralized Control Flow: The single JobTracker became a scalability bottleneck, leading to endless concerns for the scheduler and impacting reliability.
These issues hindered Hadoop's ability to support diverse programming frameworks, manage resources efficiently across multiple tenants, and scale to meet the demands of large organizations.
Methods
YARN introduces a new architecture that separates resource management from application-specific logic. The key components are:
- ResourceManager (RM): The global scheduler that manages resources across the cluster, arbitrates contention, and enforces policies like fairness and capacity. It's a single point of failure but designed for recovery.
- NodeManager (NM): The worker daemon on each node responsible for managing containers (resource allocations), monitoring node health, and reporting to the RM.
- ApplicationMaster (AM): A per-application component that negotiates resource requests with the RM, coordinates the execution of tasks within allocated containers, and handles application-specific fault tolerance. This is where the programming model logic resides.
This architecture allows for:
- Decoupling: Programming models (like MapReduce, Spark, Tez, etc.) can run as applications on top of YARN, without being tied to the resource management infrastructure.
- Flexibility: AMs can implement their own scheduling logic, fault tolerance, and optimizations, leading to better performance for specific workloads.
- Scalability: By distributing scheduling responsibilities to AMs, the RM can handle a much larger number of applications and containers.
Datasets
The paper does not introduce new benchmarks or datasets. Instead, it evaluates YARN's performance using:
- Production data from Yahoo!: Statistics on job and task throughput, resource utilization, and cluster capacity before and after upgrading to YARN.
- Canonical Hadoop benchmarks: Including Sort, Shuffle, Terasort, DFSIO (Read/Write), and AM Scalability benchmarks.
- GraySort and MinuteSort: Industry-standard benchmarks for sorting large datasets, where YARN-based MapReduce achieved new records.
Key Insights and Ideas
- The "Second System Syndrome" Avoided: YARN was designed to be evolutionary, reusing significant portions of the existing Hadoop framework to ensure backward compatibility and a smoother transition, rather than a radical rewrite.
- Flexibility is Key: Decoupling resource management from programming models unlocks a vast ecosystem of applications and frameworks that can now run efficiently on Hadoop.
- Resource Utilization Boost: YARN's more flexible resource model and improved scheduling capabilities led to a significant increase in CPU utilization at Yahoo!, effectively adding capacity without new hardware.
- Application-Centric Fault Tolerance: Shifting fault tolerance responsibilities to ApplicationMasters allows for more nuanced and efficient handling of failures, tailored to the specific application's needs.
- The Rise of the ApplicationMaster: The AM becomes the central orchestrator for each application, embodying the programming model and managing its execution lifecycle.
Key Results
- Yahoo! Production Grids: After upgrading to YARN, Yahoo! observed:
- A significant increase in daily jobs processed (from ~77k to ~100k, with peaks up to 150k on a 2500-node cluster).
- CPU utilization nearly doubled, effectively adding ~7000 cores of busy capacity.
- The ability to delay the re-provisioning of over 7000 nodes due to increased efficiency.
- Sorting Benchmarks: YARN-based MapReduce set new records for GraySort (1.42TB/min) and MinuteSort (1.61TB/min).
- MapReduce Benchmarks: Standard benchmarks showed improved performance on YARN compared to Hadoop 1.2.1, with notable speedups in Sort, Shuffle, and Terasort.
- AM Scalability: The MapReduce AM on YARN demonstrated significantly better scalability when allowed to utilize full node resources, highlighting the benefits of YARN's architecture.
- Preemption Benefits: Work-preserving preemption demonstrated a dramatic improvement in queue capacity rebalancing time, reducing it from minutes to seconds.
Limitations and Future Work
- ResourceManager as Single Point of Failure: While designed for recovery, the RM is still a single point of failure. Efforts are underway for high availability (passive/active failover).
- ApplicationMaster Complexity: Developing robust AMs can be complex, requiring careful handling of fault tolerance and coordination. Frameworks like REEF aim to simplify this.
- Log Aggregation Pressure: The log aggregation component of YARN has increased pressure on the HDFS NameNode, becoming a potential scalability bottleneck.
- Preemption Testing: While preemption shows promise, it had not been fully tested at scale at the time of writing.
- Future Work: The authors suggest continued work on improving RM availability, further optimizing AM development, and exploring the implications of mixing diverse workloads on YARN. They also highlight the ongoing development of various frameworks (Tez, Spark, Dryad, etc.) on YARN.
Summary updated