Home · ASPLOS 2023 · Memory Systems & Caches

Towards an Adaptable Systems Architecture for Memory Tiering at Warehouse-Scale

Padmapriya Duraisamy, Wei Xu, Scott Hare, Ravi Rajwar, David E. Culler, Zhiyi Xu and 12 others

Conference
ASPLOS 2023
Published
2023
Pages
727-741
Citations
68

Google replaced about a quarter of its datacenter DRAM with slower, cheaper memory and kept the median performance loss near 2% — by demoting pages that stay cold for minutes, pulling them back within a second of reuse, and never taking a page fault on the way.

The argument in one glance

  1. Problem

    DRAM is the bill that keeps growing

    In hyperscale datacenters, DRAM (the main memory in every server) is a large share of infrastructure spend, and it grows faster than other components. Meanwhile 28–42% of allocated memory in a typical address space has not been touched for two minutes. Cheaper-but-slower memory technologies exist — if the slow tier can be used without hurting anyone.

  2. What people did

    Let the hardware hide it, or let the kernel fault on it

    Intel’s "memory mode" makes DRAM a transparent hardware cache in front of the slow tier — invisible, but also uncontrollable and unobservable. OS-level alternatives like zswap and swap move cold pages away and rely on page faults to bring them back, stalling the application on every fault.

  3. Why it fell short

    Warehouse scale forbids both stalls and blindness

    Google’s fleet runs hundreds of high importance latency sensitive (HILS) services next to millions of other jobs, all with utilization targets. Fault-based recovery adds unpredictable millisecond stalls; hardware caching gives operators no policy control, no telemetry, and no way to adapt per workload. Neither meets a fleet-wide bar of less than 5% degradation.

  4. This paper's idea

    A directly addressable second tier, managed by observation instead of faults

    TMTS (transparent memory tiering system) exposes the slow tier as ordinary addressable memory. The kernel demotes pages that stay cold for minutes in the background; hardware event sampling spots reused pages and a userspace daemon promotes them back within about a second — no page fault ever. Deployed for ~2 years on thousands of machines, it serves ~25% of memory from the cheap tier at a 2.3% median performance cost.

Why this problem is worth solving

A warehouse-scale computer is one building-sized system running hundreds of thousands of jobs. Its main memory is

dynamic random-access memory — the fast, expensive chips that make up ordinary server RAM
, and the paper opens with the economic fact that drives everything else: DRAM is a large and growing slice of infrastructure cost, growing faster than the rest of the machine.

The waste is equally well measured. Between 28% and 42% of allocated memory in the studied address spaces had not been touched for two minutes. That memory still occupies DRAM priced for nanosecond access. Technologies like Intel Optane (and, in the future, CXL-attached memory) offer roughly 3× the capacity per dollar at roughly 3× the latency — the paper’s tier2 DIMMs show about 325 ns idle read latency, versus roughly 100 ns for DRAM. If the cold pages could live there, a quarter of the DRAM bill disappears.

The catch is the blast radius. This is not one appliance running one database; the change lands under 100,000+ different production jobs, from batch analytics to user-facing services with strict tail-latency targets. The paper’s own bar: replace 25% of DRAM while keeping performance degradation below 5% for the latency-sensitive class. A design that works for the average job but stalls the tail is a failed design at this scale.

What people did before, and where it broke

Hardware-managed caching (Intel “memory mode”). The memory controller treats all DRAM as a giant cache in front of Optane. Applications see one flat memory. It requires zero software change — and that is its flaw at fleet scale: the operating system cannot see hit rates, cannot steer specific jobs, cannot cap how much slow memory a latency-critical service touches, and gives up all of DRAM as cache even for jobs that need none. Control and observability are exactly what a fleet operator sells SLOs with. (An SLO, service level objective, is a promised performance target.)

Fault-based OS tiering (swap, zswap). The kernel compresses or moves cold pages out of DRAM. The page disappears from the page table, so the next access traps into the kernel — a page fault — and the application waits while the page is decompressed or migrated back. Faults happen exactly at the worst moment: the instant the application needs the data. Google runs zswap fleet-wide and knows the cost; sub-millisecond stalls are acceptable for truly-cold data but not as the recovery path for a tier holding a quarter of all memory.

Academic tiering systems (Nimble, HeMem, and others). These pioneered better migration mechanisms and hot-page tracking, but were evaluated on single machines with benchmark suites. The paper’s argument is that the hard problems only appear at scale: policy must hold across thousands of diverse, co-located, constantly-changing services, and it must be adaptable in days (userspace rollout) rather than months (kernel rollout).

The TMTS stack, from hardware to cluster scheduler

  1. Tier2 hardware new

    Optane DIMMs appear as CPU-less NUMA nodes — directly addressable, CPU-cacheable memory, about 3× slower than DRAM. A normal load or store to a tier2 page just works; it is only slower.

  2. Kernel mechanisms new

    A background scanner ages pages via the page-table accessed bit and builds per-job cold-age histograms; a migration engine demotes cold pages and promotes hot ones without faults; PEBS hardware sampling of tier2 loads is exposed to userspace.

  3. ufard (userspace policy daemon) new

    Consumes scan histograms and PEBS samples (via BPF ring buffers), decides per-job demotion ages and promotion triggers, and acts through a new promote syscall. Policies change by redeploying a daemon, not a kernel.

  4. Borg cluster scheduler new

    Learns which jobs are tier-friendly and steers tier-unfriendly, latency-sensitive jobs away from machines with high tier2 pressure.

  5. Applications

    Run unmodified. No API, no hints required (optional allocator hints exist), no page faults introduced.

Mechanism lives in the kernel; policy lives in userspace. The split is deliberate: kernel changes take months to roll out across a fleet, daemon changes take days.

The idea

TMTS stands on three design commitments.

First: the slow tier is memory, not a swap device. Tier2 is mapped like any other memory. When an application touches a demoted page, the load completes at tier2 latency — about three times slower than DRAM, but with no page fault and no kernel entry. A tiering mistake costs nanoseconds, not milliseconds. This single property removes the failure mode that makes swap-based tiering dangerous for latency-sensitive services.

Second: manage by two observable ratios. The system steers with a pair of fleet-wide metrics.

secondary tier residency ratio — the fraction of a job’s memory resident in tier2
is the savings proxy; the target is about 25%, matching the hardware provisioning.
secondary tier access ratio — the fraction of memory accesses served from tier2
is the performance proxy; keeping STAR below 0.5% (one access in 200) keeps degradation below the 5% bar, and 1.5% marks congestion. A good tiering system maximizes STRR while pinning STAR near zero — hold lots of memory in tier2, but only memory nobody touches.

Third: demote patiently, promote urgently. The two directions are asymmetric. A page cold for eight minutes will likely stay cold, so demotion can rely on slow, cheap page-table scans. But a tier2 page that gets touched once is likely to be touched again immediately — every further access pays tier2 latency. So promotion uses

processor event-based sampling — an Intel CPU feature that records, in hardware, details of sampled events; here it samples about 1% of loads served from tier2
to detect reuse within seconds, with periodic scans as a backstop. Detection speed turned out to be the most important policy choice in the whole system.

The life of one page under TMTS

tier1 = regular DRAM; tier2 = slower directly addressable memory (Optane DIMMs on the same socket). A-bit = the 'accessed' bit hardware sets in a page-table entry on any access. PEBS = processor event-based sampling (~1% of tier2-sourced loads). Ages follow the deployed policy: demote after 8 minutes cold for latency-sensitive (HILS) jobs, 2 minutes for the rest; promote on any PEBS sample or 2 consecutive 30-second hot scans.

Step 1 of 6

Allocation — always fast memory first

A job asks for memory and the kernel allocates the page in tier1 (DRAM). TMTS never allocates directly into tier2, because a brand-new page has no access history — it could be blazing hot, and starting it in slow memory would charge tier2 latency exactly when the application is actively building the data.

page P: tier1
rule: no direct tier2 allocation

Why it works

The causal chain from design to fleet-safe savings:

  • Tier2 is directly addressable → a mistimed demotion costs extra nanoseconds per access, not a millisecond fault → the worst case is mild, so policies can be aggressive enough to actually fill tier2.
  • Demotion waits for minutes of proven coldness → pages in tier2 are overwhelmingly ones nobody touches → STRR rises to ~25% while STAR stays near 0.3% → performance impact stays inside the 5% budget.
  • Promotion is driven by hardware samples of actual tier2 loads → reuse is detected in well under a second, not at the next scan → a re-activated page pays tier2 latency only briefly → hot working sets migrate back before they accumulate damage.
  • Policy lives in a userspace daemon reading kernel telemetry → Google tuned thresholds, sampling, and scheduling integration in days per iteration across 2 years → the deployed policy is the product of fleet-scale A/B measurement, not simulation.
  • The cluster scheduler sees per-job tier behavior → tier-unfriendly, latency-sensitive jobs land on machines with tier2 headroom → the tail, not just the median, is protected.

What it costs

  • Performance. Median IPC (instructions per cycle) impact of 2.3% versus identical control machines; a later 1000-machine study measured 3.5% aggregate. The distribution is bi-modal with a tail: at P5 the impact reaches about 7%.
  • Hugepage erosion. Tiering fragments memory, cutting hugepage coverage from 45% to 30% and raising TLB misses by 7% — worth about 1.5% of the total impact. Two fixes (migrating hugepages intact, more aggressive compaction) each bought back ~0.5%.
  • Hardware interference. When the Optane DIMM controller’s buffer fills, it stalls the memory channel it shares with DRAM — about 1.5% impact from increased DRAM latency. Newer Optane and CXL memory reduce this coupling.
  • Migration and scan overhead. Background scans, sampling, and the daemon consume CPU, and migrations consume bandwidth — though 80% of tier2 bandwidth is applications, only 20% migrations (two thirds of that demotions).
  • Blind spots. PEBS samples loads only; store-only pages wait for the slower scan backstop. Demotion stays on the local socket because memory-controller QoS cannot throttle cross-socket bursts, limiting placement freedom.

The evaluation

The evaluation is unusual for an architecture paper: a two-year A/B experiment on live production, with 2,200 machines running two-tier memory against 1,000 identically-scheduled one-tier control machines, across 6 clusters and over 100,000 jobs (about a quarter of them latency-sensitive HILS). Headline results: tier2 residency held at the ~25% target; memory utilization stayed identical to control (median 77%, P95 91%), meaning the cheap tier genuinely substituted for DRAM rather than idling; cold-memory coverage averaged 75%; and median STAR was 0.3% with P95 under 1% — inside the “below 5% degradation” budget.

The policy studies each ran on ~300-machine slices for 2 weeks. Demotion: a class-aware 8-minute/2-minute cold age cut HILS median STAR by 46% (0.35% → 0.19%) versus a flat 2-minute policy. Promotion, the study that matters most, compared three detectors:

Promotion policies: how fast is reuse detected?

Property30 s scans, 2 hits (60s)30 s scans, 1 hit (30s)PEBS sampling + scan backstop (deployed)
How a hot tier2 page is noticed
Median promotion latency
Effect on the two steering metrics
Policy slices: ~300 machines across 6 clusters, 2 weeks each, live production jobs. Fleet A/B: 2,200 experiment vs 1,000 control machines over ~2 years. Performance metric = IPC on two-tier machines vs matched jobs on one-tier controls.Underlined values explain themselves when clicked.

Two adaptive extensions close the paper. Making the Borg scheduler tier-aware (about 20% of jobs are tier-friendly, 17% unfriendly) cut STAR by 30% and improved latency-sensitive job performance 4% on a 600-machine trial. And letting the TCMalloc allocator hint likely-cold allocations raised Spanner’s cold-memory identification from 10% to 42% while reducing its query latency 2%.

Check your understanding

  1. 1. A job touches a page that TMTS demoted to tier2 ten minutes ago. Predict what happens at the moment of that access.

  2. 2. Why does TMTS pair PEBS hardware sampling with A-bit scans for promotion, instead of just scanning faster?

  3. 3. TMTS steers the fleet by two ratios. Why is STAR (fraction of accesses served from tier2) the performance proxy, rather than STRR (fraction of memory resident in tier2)?

  4. 4. Why does TMTS forbid allocating new pages directly into tier2, even when tier1 is under pressure?

Related papers on Memory Systems & Caches

See all 118 →