arXiv:2610.13396cs.DCOct 2026

Manuscript Offprint

arXiv:2610.13396

ShoreKeeper: Accelerating Iterative Data Analytics in the Cloud via Distributed Recovery-Cost-Aware Caching

Jongseop Lee, Minsu Sun, Xinyue Ma, Atul Sandur, Myeongjae Jeon

Abstract

Large-scale data-intensive workloads powered by iterative graph or machine learning processing have an insatiable demand for memory due to the continuous generation of new intermediate data. Although existing caching strategies strive to keep performance-critical data in memory, they often fail in practice because they are limited to node-local memory management and assume high node availability. In this paper, we introduce ShoreKeeper, a framework that maximizes execution efficiency by treating cluster-wide memory as a unified, elastic pool. ShoreKeeper employs a global optimization model that maps distributed dataflows into a single graph abstraction to minimize the recovery cost of data evicted from cache across the cluster. To handle memory working sets and cluster capacities that fluctuate over time, ShoreKeeper employs a graph-pruning technique that permits the fast refinement of the caching plan. These optimizations allow ShoreKeeper to work seamlessly whether deployed on highly available VMs or cost-effective preemptible instances in the cloud. Our experiments show that ShoreKeeper consistently outperforms state-of-the-art systems.

1 Introduction

Numerous large-scale data-intensive workloads synthesize models to characterize intricate real-world phenomena. For example, structural graph analysis uncovers influential nodes based on the density and quality of their incoming connections within massive networks [47]. Similarly, probabilistic forecasting or recommendation systems leverage various machine learning algorithms to identify latent relational patterns within vast datasets [13, 36, 37]. Such workloads rely on iterative model refinement, with more iterations leading to a higher model accuracy [16, 24, 32, 42]. Modern distributed processing frameworks typically express this refinement process using a dataflow-based execution model [14, 25, 29, 69] that expands incrementally as new computational iterations are initiated and generate downstream data blocks.

In-memory caching is vital for iterative data processing because it eliminates recovery costs for intermediate data blocks accessed across iterations. However, such computations constantly inflate the volume of intermediate data as

Myeongjae Jeon

POSTECH

they progress through the dataflow, often straining available memory resources [18, 57]. When faced with memory shortage, an effective caching strategy must navigate a complex trade-off between the execution gains of retaining individual data blocks and the recovery costs—via recomputation or disk I/O—incurred if those blocks are evicted. Earlier caching policies such as least reference count (LRC) [67] and most reference distance (MRD) [48] bypass this complexity simply by exploiting block dependency information exposed in the dataflow. A more recent system, Blaze [57], accounts not only for dynamic access patterns, but also for the size and expected recovery cost of each block. With this information, each compute node independently prioritizes caching of intermediate data that is more costly to retrieve at each iteration boundary.

While effective at the individual node level, prior methods fall short of optimizing caching decisions in diverse distributed settings. In this work, we design and implement ShoreKeeper, a generic cost-aware caching system that works effectively for various deployment scenarios at scale. Specifically, we address two critical challenges:

• Recovery cost imbalance. Despite the efforts of system schedulers to load balance across the cluster [12, 70], new blocks generated by concurrent tasks across nodes are often non-uniform in size and computation time. Such imbalance occurs even when nodes execute the dataflow with an identical sequence of operations, due to factors like varying data filtering ratios or skewed key compositions after group-by-key operations [39, 51]. This poses two issues for node-level memory management. (1) Some nodes may saturate their memory capacity earlier than others, triggering premature block evictions while free space remains available on remote nodes. (2) Even when no such free space exists, local eviction decisions can lead to the loss of blocks that are globally expensive to recover. Without a cluster-wide view, nodes cannot coordinate caching decisions to prioritize high-cost blocks across the entire fleet.

• Resource preemption. To leverage scalability and ease of maintenance, data analytics workloads often run in public clouds [6, 26, 43], using options ranging from on-demand virtual machines (VMs) to preemptible instances [5, 27, 44]. Node availability in such environments can fluctuate because

Figure

(a)

(b)

Figure 1. (a) A flowchart of the GraphX PageRank algorithm on Spark. (b) The corresponding DAG of the iterative execution. Each job (iteration) consists of stages (Sx: Stage x), each producing intermediate states called RDDs (Rx: RDD x). RDDs can be used across iterations (e.g., R37 and R43 in Iteration 0). Shuffle dependencies are omitted for clarity.

of hardware or software failures or, more commonly, due to preemptions that make room for high-priority requests. Such disruptions risk the loss of crucial cached blocks (costly to recover), prompting systems to maintain them across constantly shifting memory pools. Cloud-native solutions do not currently meet this goal: they simply attempt to use idle remote memory to temporarily store random local blocks when preemption notices occur [10].

ShoreKeeper addresses these issues by introducing a global, cluster-level cost optimization framework aimed at minimizing application execution time subject to the time-varying aggregate memory capacity of the cluster. At its core, the system executes a mixed integer linear programming (MILP) solver that determines not only which data blocks to keep in memory (caching), as prior cost-aware systems do, but also where each data block should reside across the cluster (placement). ShoreKeeper treats every executor as a candidate location and precisely weighs the gain of retaining a partition against the cost of evicting resident data at the destination. To explore such plans, ShoreKeeper transforms the distributed dataflows across compute nodes into a single unified computational graph that captures cluster-level recovery costs and accounts for cross-node transfer latency.

ShoreKeeper applies a dataflow pruning algorithm to keep MILP solving tractable. It prunes the optimization scope to only those blocks relevant to upcoming iterations in a near-future window, reducing decision latency to under 4 secs in our experiments. This latency is low enough to invoke the solver on-the-fly for intermediate data blocks produced at every iteration at scale. For blocks designated for another node, ShoreKeeper performs cross-node transfers in the background, using only the network capacity that foreground computation leaves idle.

ShoreKeeper’s strategy for preemptible instances exploits cloud-native preemption events to dynamically refine its caching plan under reduced cluster capacity. Most cloud providers issue preemption alarms with predefined grace periods (e.g., 30 secs in Google Cloud). Upon receiving an alarm, ShoreKeeper re-triggers its solver to quickly migrate critical blocks from nodes slated for reclamation within the grace period. However, preemption alarms can occasionally be missed in practice [9, 59]. To handle such misses, ShoreKeeper periodically replicates a minimal set of blocks produced by time-consuming shuffle communication.

We build ShoreKeeper atop Apache Spark 3.3.2 [70] and evaluate it against state-of-the-art in-memory caching [48, 57, 67] and storage-based checkpoint systems [55] over four benchmarks. With on-demand instances, ShoreKeeper achieves up to 6.11×6.11\times speedup over cost-agnostic caching methods and up to 2.05×2.05\times over Blaze [57], with the largest gains on workloads with the highest cross-executor imbalance. With preemptible instances, the performance gap widens further: ShoreKeeper achieves up to 2.87×2.87\times speedup over Blaze combined with Spark’s Decommissioner [10], as cost-aware evacuation and proactive replication protect high-cost partitions.