💰 Don't size caches for peak—let them stretch and shrink with demand to cut cost. Google applies the classic ski rental problem to a production database.
Title: Optimizing cloud economics with linear elastic caching
URL:
📦 Overview
Linear elastic caching treats memory footprint as a variable cost that integrates over time, dynamically growing and shrinking cache size to match the workload.
🎯 The problem
Cloud memory is expensive (serverless can charge up to $3/day per GiB). Fixed-size caches hit a "Goldilocks dilemma": too small hurts performance, too large wastes thousands on idle memory during low demand.
🎿 Method
Each page faces a choice: "rent" (keep in RAM, paying continuous memory cost) or "buy the miss" (evict, risking latency/I/O later). A ski rental algorithm sets each page's TTL. The key result: eviction policy and rental duration can be optimized separately.
🌲 Implementation
For Spanner, a lightweight shallow decision tree (compilable to C++) predicts the optimal TTL from data size, miss cost, and operation type—no heavy inference in the cache path.
📉 Results
In production on Spanner: memory down 15.5%, misses up only 5.5%, TCO down ~5%, I/O impact a mere 0.5%. On public traces it consistently beat fixed-size (GDSF) baselines.
#
CloudComputing# #
Algorithms#