TL;DR
ShoreKeeper is a distributed, cost-aware caching framework designed to accelerate iterative data analytics (like graph processing and machine learning) in the cloud. By treating cluster-wide memory as a unified pool and using a global optimization model to manage data placement, it significantly reduces execution times and provides robust resilience against the sudden loss of "spot" or preemptible instances.
What Problem Does This Paper Address?
Iterative data processing frameworks (like Apache Spark) generate massive amounts of intermediate data. Caching this data in memory is essential for performance, as it avoids the high cost of recomputing results or fetching them from disk in subsequent iterations. However, two major challenges often break existing caching strategies:
- Recovery Cost Imbalance: Even if data is initially distributed evenly, runtime factors like data skew or selective filtering cause some nodes to run out of memory while others sit idle. Node-local caching policies can't "see" this imbalance, leading to premature data evictions on overloaded nodes even when free memory exists elsewhere in the cluster.
- Resource Preemption: To save costs, many users run workloads on "preemptible" or "spot" instances, which cloud providers can reclaim at any time. When a node is lost, all its cached data vanishes. Existing systems either lose this data entirely or try to migrate it randomly during a brief grace period, often failing to save the most "expensive" (hardest to recompute) data blocks.
Methods
ShoreKeeper introduces a Unified Planner that moves beyond node-local decisions. It models the entire cluster's memory as a single elastic pool and uses Mixed Integer Linear Programming (MILP) to jointly decide which data blocks to cache, where to place them, and whether to replicate them.
Key technical components include:
- Global Cost Model: Unlike prior work that only looks at local recomputation, ShoreKeeper’s model accounts for cluster-wide recovery costs, including lineage-aware recomputation, disk I/O, and cross-node network transfer latencies.
- Graph-Pruning for Tractability: Solving a global MILP for every data block is computationally expensive. ShoreKeeper employs pruning techniques—such as focusing only on blocks needed for upcoming iterations and approximating complex "shuffle" dependencies—to keep solver latency under 4 seconds.
- Proactive Runtime Management: A manager executes the plan in the background, using idle network capacity to migrate blocks. On receiving a preemption alarm, it prioritizes evacuating the most expensive data first. It also performs minimal, proactive replication of high-cost shuffle partitions to handle rare cases where preemption alarms are missed.
Datasets
The authors evaluated ShoreKeeper using four standard iterative benchmarks:
- PageRank (PR): A graph algorithm with deep lineage and a massive working set (1.3x the aggregate cache).
- Connected Components (CC): Another graph workload with shorter lineage but high memory pressure.
- Logistic Regression (LR): A machine learning workload with a compact computational graph.
- SVD++: A collaborative filtering algorithm where data blocks have high recovery costs due to heavy serialization.
Experiments were conducted on AWS EC2 using both stable on-demand instances and volatile spot instances.
Key Insights and Ideas
- Imbalance is Structural: The authors found that recovery cost imbalance isn't just a fluke; it's a structural property of iterative workloads as they progress. Figure 3 illustrates how recovery costs (in red) concentrate on specific executors, creating bottlenecks that node-local caching cannot solve.
- The "Unified Pool" Advantage: By treating the cluster as one memory pool, ShoreKeeper allows "lightly loaded" nodes to absorb high-cost partitions from "heavier" peers, flattening the recovery cost distribution across the fleet.
- Prioritized Evacuation: During the 30-120 second grace period before a node is reclaimed, what you save matters more than how much you save. ShoreKeeper’s ability to identify and move the most "expensive" blocks first is a major performance win.
Key Results
- On Stable VMs: ShoreKeeper achieved speedups of 2.05x to 6.11x over cost-agnostic caching (like LRU) and up to 2.05x over Blaze, the previous state-of-the-art cost-aware system.
- On Preemptible Instances: The performance gap widened. ShoreKeeper outperformed the best baselines by up to 2.87x on PageRank workloads, effectively mitigating the impact of frequent node departures.
- Scalability: The pruning techniques proved effective; ShoreKeeper remained roughly 2.1x faster than Blaze even as the cluster scaled from 10 to 40 executors, with only a minimal increase in execution time.
Limitations and Future Work
- Iterative Focus: The current design relies on iteration boundaries to trigger the solver. Extending this to general, non-iterative dataflows would require the solver to reason over much larger, potentially infinite, graphs.
- Profiling Overhead: While the authors minimized runtime overhead, the system still benefits from an initial "dry-run" for profiling. Future work could explore reusing profiles from similar workloads or more aggressive online-only profiling.
- Heterogeneous Resources: The current implementation focuses on clusters with a single resource type. The authors suggest that extending ShoreKeeper to handle mixed fleets (e.g., a few on-demand nodes mixed with many spot instances) is a promising future direction.
Summary updated