Skip to content

ForkTide: Lineage-Aware Placement for Branching Code-Agent Sandboxes

Qibin Gu

cs.DC

Abstract

Parallel code-agent exploration spawns sibling sandboxes that share workspace ancestry and frequently issue expensive build, test, or patch operations together. Co-locating siblings preserves parent state and avoids remote copies, yet funnels concurrent compilation, linking, and restores onto a single host's execution slots and storage queue; distributing siblings relieves that contention at the risk of redundant parent transfers. ForkTide resolves this tension by pairing an application-boundary incremental restore runtime with a contention-aware multi-stage placement planner. A persistent per-host fork broker reconstructs immutable ancestor mappings so evicted and restored branches retain physical page sharing across sibling lifetimes. Building on that sharing model, the planner prices lineage residency, empirically calibrated tool-width interference, and one-time remote parent transfers across consecutive stages, while an optional receiving-side reservation protects reactive cross-host moves when local demand races a transfer. In native Linux calibration across 4,320 restores, eight restored siblings map 128 MiB of tracked state over just 44 MiB of distinct physical pages, achieving 15.03-27.73 ms cold batch readiness. Across 40 GoogleTest, Python, and Git tasks on two cloud VMs with a 72 MiB per-host snapshot budget, ForkTide advances the latency-transfer Pareto frontier under both recorded timing and live GPU inference (3,409 verified SSE tool releases). Relative to fixed spreading, ForkTide reduces device writes plus VPC snapshot bytes by 9.6% (recorded) and 10.3% (live GPU, 95% CI [-310,-232] MiB), with lower P95 point estimates (5.27 s vs. 6.16 s recorded; 6.73 s vs. 7.50 s live, CI [-0.766,+0.034] s). Relative to ancestor-aware LRU and a shared-affinity placement ablation, ForkTide reduces P95 latency by 36.5-45.5% for 7.6-9.5% additional bytes.

Create a lesson

Metadata

Categories
cs.DC, cs.OS
Comments
19 pages including supplementary material, 10 figures