TL;DR
This paper introduces Tangram, a novel distributed data analytics system that unifies immutable and mutable data abstractions. By allowing applications to dynamically choose the appropriate abstraction for different data collections, Tangram achieves both the robustness of immutable systems (like Spark) and the efficiency of mutable systems for iterative workloads, without sacrificing performance.
What Problem Does This Paper Address?
Traditional distributed data analytics frameworks typically fall into one of two camps: those that use immutable data abstractions (like MapReduce and Spark) and those that use mutable data abstractions (like parameter servers for machine learning). Immutable systems excel at failure recovery and straggler mitigation due to their predictable, bulk processing nature. However, they struggle with iterative workloads that benefit from in-place state updates and asynchronous execution. Mutable systems, on the other hand, are efficient for these iterative tasks but make failure recovery and straggler mitigation significantly more challenging, often requiring full restarts from checkpoints. This creates a trade-off: choose robustness or efficiency. The paper addresses the need for a unified framework that can leverage the strengths of both, adapting to the specific needs of different parts of a data analytics pipeline.
Methods
The core of Tangram is its MapUpdate programming model. This model uses a A.map(B).update(C) syntax, where A is the map collection, B is an optional side-input collection, and C is the update collection. The key innovation is that Tangram can infer the mutability of collections based on their role in the update operation. The update collection is treated as mutable, while others are immutable by default. This allows Tangram to apply different strategies:
- Immutable Abstraction: For collections treated as immutable, Tangram provides robust failure recovery through lineage-based recomputation of lost partitions and effective straggler mitigation via speculative execution.
- Mutable Abstraction: For collections treated as mutable, Tangram supports efficient in-place updates and asynchronous execution, crucial for iterative algorithms.
- Context-Aware Failure Recovery: Tangram distinguishes between local failures (where failed machines don't hold mutable data) and global failures (where mutable data is lost). This allows it to apply targeted recovery strategies, such as reloading only lost partitions for immutable data or rolling back to a checkpoint for mutable data.
- Partition-Based Progress Control: Tangram uses a partition-level progress tracking mechanism to support BSP, SSP, and ASP execution models, enabling flexible synchronization for iterative tasks.
- Optimizations: Tangram incorporates techniques like delay combiners for communication reduction, process caching for side-input data, and local zero-copy communication.
Datasets
The paper evaluated Tangram on several standard datasets and workloads:
- Bulk Processing: Wikipedia corpus for Word Count and TF-IDF.
- Iterative Machine Learning:
- Dense dataset (mnist8m) for K-means.
- Sparse dataset (webspam) for Logistic Regression (LR).
- Graph Analytics: WebUK graph for PageRank and Single Source Shortest Path (SSSP).
- Other Workloads: Yahoo! Music dataset for Nomad (matrix factorization).
- Pipelined Workloads: A custom pipeline involving TF-IDF vectorization and LR model training using a subset of the English Wikipedia dataset.
No new benchmarks were introduced; instead, the paper focused on comparing Tangram's performance against existing specialized systems and general-purpose frameworks on these established tasks.
Key Insights and Ideas
- Unifying Abstractions is Key: The most significant insight is that the strict dichotomy between immutable and mutable systems is artificial. By intelligently inferring mutability from the API, Tangram demonstrates that a single system can effectively handle both, unlocking performance benefits without sacrificing robustness.
- Context-Awareness Pays Off: Differentiating between local and global failures, and more importantly, between immutable and mutable data partitions, allows for significantly more efficient and targeted failure recovery. This is a crucial step beyond generic checkpointing or recomputation.
- Partition-Level Control is Powerful: Moving away from worker-level or global progress tracking to a partition-level approach enables finer-grained control and better support for asynchronous and iterative computations.
- Pipelined Workloads Benefit Immensely: The paper highlights that complex data pipelines, common in real-world applications, suffer from expensive context-switching overheads when using multiple specialized systems. Tangram's unified framework eliminates this, leading to substantial performance gains.
Key Results
- Failure Recovery: Tangram demonstrated significantly faster failure recovery than Spark for both local (K-means) and global (PageRank) failures, with local failure recovery being up to 2.25x faster and global failure recovery up to 1.7x faster.
- Straggler Mitigation: Partition migration in Tangram reduced per-iteration time by up to 41% compared to no migration. Differentiating mutable and immutable partitions further sped up migration by approximately 38%.
- Bulk Processing: Tangram was competitive with Spark for Word Count and achieved 2x faster performance for TF-IDF.
- Iterative Machine Learning: Tangram showed competitive performance with Petuum (a specialized parameter server system) for K-means and LR, with good scaling.
- Graph Analytics: Tangram outperformed specialized systems like GraphX, PowerGraph, and PowerLyra for PageRank and SSSP, attributed to its message combining optimizations.
- Pipelined Workloads: Tangram significantly outperformed Spark-based solutions (including Spark+Petuum) for a TF-IDF to LR pipeline, primarily by eliminating costly context-switch overheads between different systems.
Limitations and Future Work
- Master Failure: Tangram currently only handles worker failures. The authors mention that master failure could be handled by a standby master, similar to Spark, but this was not implemented in the current version.
- Online Re-partitioning: Tangram does not currently support online re-partitioning to address skewed partition sizes, which can lead to unbalanced workloads.
- Future Work: The authors suggest exploring more advanced scheduling and optimization techniques, as well as extending the system to handle more complex data structures and distributed coordination patterns. The unified framework also opens doors for further research into adaptive execution strategies and more sophisticated fault tolerance mechanisms.
Summary updated