---
title: "Optimizing cloud economics with linear elastic caching"
description: "Linear elastic caching treats cache memory as a cost that grows linearly with data size and time held, and frames each page's retention as a ski rental problem: keep paying for RAM or evict and risk a miss penalty."
url: "https://swe.quest/articles/optimizing-cloud-economics-with-linear-elastic-caching-1df4c9ca9645409f"
canonical: "https://research.google/blog/optimizing-cloud-economics-with-linear-elastic-caching/"
source: "Google Research"
published: "2026-06-25"
difficulty: "medium"
kind: "Research"
reading_minutes: 7
tags: ["caching","algorithms","cost-optimization","machine-learning","databases"]
---

# Optimizing cloud economics with linear elastic caching

A post on [Google Research](https://swe.quest/sources/google-research.md), published 2026-06-25, 7 min read, Research. Original: [https://research.google/blog/optimizing-cloud-economics-with-linear-elastic-caching/](https://research.google/blog/optimizing-cloud-economics-with-linear-elastic-caching/)

## Summary

Linear elastic caching treats cache memory as a cost that grows linearly with data size and time held, and frames each page's retention as a ski rental problem: keep paying for RAM or evict and risk a miss penalty. The key theoretical result is that per-page rental duration (a TTL) and capacity-bound eviction (e.g. LRU) can be optimized separately. In Spanner, a shallow decision-tree model predicts a TTL per page from data size, miss cost and operation type. It cut memory by 15.5% and TCO by about 5%, with 5.5% more misses but only a 0.5% rise in I/O cost. On public traces, learned and breakeven/randomized TTL variants beat a fixed-size GDSF baseline on total cost and miss rate, with larger gains as memory gets more expensive relative to misses.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Caching](https://swe.quest/tags/caching.md) (Backend & APIs)
- [Algorithms](https://swe.quest/tags/algorithms.md) (Architecture & design)
- [Cost optimization](https://swe.quest/tags/cost-optimization.md) (Reliability & operations)
- [Machine learning](https://swe.quest/tags/machine-learning.md) (AI & ML)
- [Databases](https://swe.quest/tags/databases.md) (Data & databases)

## Prerequisites

- cache eviction policies like LRU ([easy posts on Caching](https://swe.quest/tags/caching.md?difficulty=easy))
- online algorithms basics ([easy posts on Algorithms](https://swe.quest/tags/algorithms.md?difficulty=easy))

## Keywords

Spanner, ski rental problem, GDSF, LRU, CIDR, linear elastic caching

## Related posts

- [Kangaroo: A new flash cache optimized for tiny objects](https://swe.quest/articles/kangaroo-a-new-flash-cache-optimized-for-tiny-objects-925482fcf04e3dc4.md): Meta Engineering · 2021-10-26 · Hard · 5 min read · Caching, Storage systems, Data structures, Hardware
  Kangaroo is a flash cache for tiny objects (~100 bytes) that pairs a small log-structured cache (KLog, ~5% of flash) with a large set-associative cache (KSet).
- [Transparent memory offloading: more memory at a fraction of the cost and power](https://swe.quest/articles/transparent-memory-offloading-more-memory-at-a-fraction-of-the-cost-and-power-9a77f7c0bbbc4e59.md): Meta Engineering · 2022-06-20 · Hard · 11 min read · Linux, Memory management, Operating systems, Cost optimization, Storage systems
  TMO offloads cold memory to compressed RAM (zswap) or NVMe SSD swap.
- [Introducing Web Cache API support on Deno Deploy](https://swe.quest/articles/introducing-web-cache-api-support-on-deno-deploy-30aea198ea4df954.md): Deno · 2024-08-27 · Medium · 4 min read · Caching, Serverless, JavaScript, CDN & edge
  Deno Deploy now offers beta support for the web-standard Cache API, giving serverless code semi-persistent storage for Request/Response pairs via caches.open(), cache.match() and cache.put().
- [Session revocations at scale](https://swe.quest/articles/session-revocations-at-scale-0e845eb64b268c30.md): Canva Engineering · 2026-07-22 · Medium · 9 min read · Identity & auth, Caching, Scaling, System design, Storage systems
  Canva moved its gateway session-revocation cache from per-pod MySQL loads to sorted binary chunks in S3, eliminating the database stampede when hundreds of gateway pods started during deploys.
- [Astra Dynamic Chunks: How We Saved by Redesigning a Key Part of Astra](https://swe.quest/articles/astra-dynamic-chunks-how-we-saved-by-redesigning-a-key-part-of-astra-2ad19dfa88650f39.md): Slack Engineering · 2024-11-18 · Medium · 6 min read · Search, Cost optimization, Storage systems, Algorithms, Deployment
  Slack's Astra log search engine replaced fixed-size chunk slots on cache nodes with dynamically sized chunks, because undersized chunks wasted allocated disk space and oversized chunks from recovery tasks could overflow their slots.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
