WHITE PAPER 4 · DATABASE CACHING
DRAM is fast and expensive, and caches built only from DRAM become costly as working sets grow. Hybrid tiered caches keep the hottest data in DRAM and place warmer data on cheaper tiers: memory attached over Compute Express Link (CXL), byte-addressable persistent memory where it exists, and NVMe flash.
Bassirah Technology — Innovation & R&D · 26 October 2026 · Free to share with attribution
DRAM is fast and expensive, and caches built only from DRAM become costly as working sets grow. Hybrid tiered caches keep the hottest data in DRAM and place warmer data on cheaper tiers: memory attached over Compute Express Link (CXL), byte-addressable persistent memory where it exists, and NVMe flash. This paper examines how such caches are built and what each tier demands. It explains the difference between non-volatile memory and NVMe, uses the five-minute rule to frame when data belongs in each tier, and summarizes what a generation of research on Intel Optane persistent memory taught before that product was wound down. It describes CXL memory expansion and pooling, the operating-system and database techniques that place hot and cold pages across memory tiers, and the behavior of flash that shapes flash caches: write amplification, endurance, and the host-placement interfaces Flexible Data Placement and Zoned Namespaces. It then covers hybrid DRAM and flash cache designs, database buffer pools over NVMe, product approaches to tiering, warm restart, and tiered KV caches in language-model serving. It closes with a qualitative comparison, open challenges and notes for platform decisions.
Memory is a major driver of both performance and hardware cost in large platforms; cloud providers describe DRAM as a large share of server cost and report that much provisioned memory goes unused [1], [2]. Per-gigabyte DRAM prices have also stopped falling as quickly as they once did [3]. Meanwhile, NVMe SSDs have become inexpensive and offer high throughput, especially with several drives per server [4], [5]. A cache that keeps its hottest data in DRAM and its warm data on a cheaper tier can hold a much larger working set at a given cost. The engineering problem is to decide what lives where, to move data between tiers without stalling requests, and to respect the physical limits of each tier, above all the finite write endurance of flash.
The two terms are often confused. Non-volatile memory (NVM), in the sense used here, is byte-addressable memory that keeps its contents without power and is accessed with ordinary load and store instructions; Intel Optane persistent memory was the main commercial example [6], [7]. NVMe is a family of specifications for accessing storage devices, most often flash SSDs, over PCIe and network transports [8]. Flash behind NVMe is accessed in blocks, erased in larger units and worn by writes [9]. This paper covers both, together with CXL-attached memory, which is volatile DRAM reached over a different interconnect [10].
Paper 1 described caching strategies, eviction and invalidation; paper 2 described learned admission, including admission for flash caches. Paper 3 described KV-cache reuse in language-model serving, whose tiered storage returns briefly in Section 11. Paper 2 of the Data Storage Engines series described LSM-tree engines, whose write amplification is closely related to the flash behavior in Section 7.
This paper covers tiered caching across DRAM, CXL-attached memory, persistent memory and NVMe flash, in application caches, key-value caches and database buffer managers. It concentrates on peer-reviewed work from 2017 to 2026 and on official documentation, and cites foundational work where it introduced an idea still in use. Preprints are identified as such. Statements about products reflect documentation accessed on 26 October 2026. It does not report latency, bandwidth, throughput, capacity, endurance or cost figures; where a paper reports results, we describe them qualitatively and attribute them to the authors.
A tier is a class of memory or storage with its own cost, speed and capacity. Promotion moves data to a faster tier and demotion to a slower one. Write amplification is the ratio of bytes written to flash media to bytes the host asked to write; it is caused by garbage collection inside the device and by rewriting in the application [11], [12]. Endurance is the amount of data that can be written to a flash device before it can no longer store data reliably [9]. Overprovisioning is spare flash capacity reserved to reduce write amplification. A warm restart brings a cache back with its contents after a process restart rather than empty.
Table 1 summarizes the tiers a cache can use. The descriptions are qualitative and relative; actual behavior depends on the device, platform and workload.
| Tier | Access model | Persistence | Main strengths | Main constraints |
|---|---|---|---|---|
| Local DRAM | Load and store | Volatile | Very low access cost; no wear | Cost per byte; capacity per socket |
| CXL-attached memory | Load and store over CXL | Volatile (as typically deployed) | Adds capacity and bandwidth beyond the CPU's own memory channels | Slower than local DRAM; software and platform maturity |
| Persistent memory (Optane PMem) | Load and store; persistent mode | Persistent | Byte-addressable persistence | Product line wound down; crash-consistency burden on software |
| NVMe flash | Block I/O | Persistent | Low cost per byte; high throughput with parallel I/O | Finite endurance; write amplification; block granularity |
| Remote and object storage | Network I/O | Persistent | Very low cost per byte at scale | Highest access cost; the tier the cache protects |
Gray and Putzolu framed the trade-off between memory and slower storage as a break-even interval: an item re-referenced more often than that interval is cheaper to keep in memory than to fetch each time, and the interval follows from the ratio of memory cost to access cost [13]. Because prices and device speeds change, the interval must be recomputed as technology changes, and revisits have traced how it reshaped the storage hierarchy [14]. Two recent revisits extend the reasoning. Duwe et al. recompute it for the cloud, where resources are elastic and billed by use, and find that the right caching decision for object storage differs sharply between latency-sensitive and latency-tolerant workloads [15]. A recent preprint argues that for hosts with very fast SSDs, flash becomes an active data tier rather than passive storage [16]. For cache design, the lesson is to size each tier from re-reference intervals and current tier economics, for each adjacent pair of tiers, rather than from a rule of keeping everything in DRAM.
Intel Optane DC Persistent Memory modules sat on the memory bus and could run in a volatile mode, with DRAM acting as a cache in front of them, or in a persistent mode accessed directly by software [6]. Measurements on real hardware showed byte-addressable, persistent memory that was slower than DRAM but far faster than flash for small accesses, and whose performance depended on access size, write pattern and thread count in ways that earlier emulations had not captured [6], [7].
Database research explored how to use the new tier. Van Renen et al. showed that using persistent memory alone, or as a page store behind a DRAM cache, each wastes something, and argued for a three-tier DRAM, persistent memory and SSD buffer manager that loads data from persistent memory at fine granularity [17]. Spitfire found that persistent memory breaks two classic buffer-manager assumptions, that data must be moved into DRAM to be used and that storage is far slower than DRAM, and used tunable, probabilistic migration between tiers whose best setting depends on workload and hardware [18]. Viper showed that a key-value store designed for the medium, with a hash index in DRAM and records in a persistent-memory-aware layout, works better than replacing an SSD with persistent memory under a block-oriented design [19].
Persistence in memory moves the burden of crash consistency from the storage stack into the application. A store is not durable until it is flushed from CPU caches, caches can write back in any order, and a crash can leave data partly written; the PMDK libraries provide transactional object stores so that applications need not manage flushing by hand [20]. Systematic testing of persistent-memory key-value stores found many previously unknown correctness and performance bugs, including in PMDK itself [21].
In the second quarter of 2022 Intel initiated the wind-down of its Optane memory business, stating that it was not aligned with its strategic priorities and that it expected to meet existing customer commitments [22]. PMDK is now maintained on a best-effort basis, with many libraries discontinued [20]. The research remains useful: its lessons about tier-aware buffer management [17], [18], layouts designed for the medium [19] and crash consistency [20], [21] apply to any slower, larger memory tier, including the CXL memory in Section 5.
Compute Express Link is an open, cache-coherent interconnect for processors, memory expansion and accelerators [23]. It carries three protocols over the PCIe physical layer: one for I/O, one for device caching and one for memory access [10]. A Type 3 device is a memory expander that the host reaches with ordinary loads and stores, coherent with host memory [10]; to the operating system it usually appears as a NUMA node without CPUs, slower than local DRAM [24], [25]. CXL 2.0 added switching, memory pooling and persistent-memory support; CXL 3.0 added multi-level fabrics and memory sharing, in which one region is coherently visible to several hosts [10]. The consortium presents its current generation as backward compatible with all earlier versions [23].
CXL memory can add capacity and bandwidth and decouple memory technology from the CPU’s own memory interface [24]. Pond studied pooling in a public cloud: much provisioned memory is stranded or never touched, small CXL pools shared by a few sockets keep access latency low, and machine-learning predictions of how much local memory each virtual machine needs let the platform hide the slower tier from latency-sensitive workloads [1]. The case for pooling is contested: Levis et al. argue against CXL memory pooling in a position paper [26]. Measurements on real CXL devices show that they behave differently from the remote NUMA node used to emulate them in earlier research, so earlier conclusions need revisiting [24].
Database researchers have evaluated CXL memory directly. A CXL memory expander inside an in-memory database showed that transactional workloads were barely affected and analytical workloads only modestly, presenting CXL as a lower-cost way to expand in-memory capacity [27]. A later study found that a hardware-managed mode that tiers local DRAM and CXL memory at cache-line granularity can exploit locality in analytical workloads, with results depending on access patterns and data placement [28]. Lerner and Alonso argue that CXL’s larger impact may be architectural, enabling databases to scale up by adding individual resources rather than whole servers [29]. Hao et al. compare ways a buffer manager and index can use a far-memory tier between DRAM and SSD and find that no single design wins on every metric [3].
The operating system and runtime research on tiered memory is, in effect, research on two-level caches whose unit is a page. Its lessons apply to any tiered cache.
TPP, developed for CXL-attached memory, found that many applications in Meta’s fleet have a sizeable share of cold pages; it demotes cold pages proactively, keeps headroom in local DRAM for new allocations, and promotes hot pages back with low overhead, and most of its changes were merged into the mainline Linux kernel [2]. Linux now groups memory into tiers, demotes pages from a fast tier to a slower one under memory pressure before swapping, promotes frequently used pages through NUMA balancing, and allows promotion to be rate-limited because migration traffic itself hurts latency [25]. HeMem tracks hot pages by sampling hardware performance counters rather than scanning page tables and migrates pages asynchronously, so applications do not stall [30]. Memtis sizes the hot set from the access distribution of all pages rather than fixed thresholds and splits huge pages whose access is skewed [31]. Nomad keeps a copy of recently promoted pages in the slow tier, so demotion is cheap and pages do not thrash under memory pressure, the same trade-off as inclusive versus exclusive cache hierarchies [32]. Colloid shows that placing the hottest pages in the nominally fastest tier can be wrong under load, because queueing raises that tier’s real latency, and balances measured access latencies across tiers instead [33].
For cache designers the lessons are direct: measure hotness cheaply, move data off the request path, size the fast tier from the access distribution, consider keeping copies to make demotion cheap, rate-limit migration, and place data by loaded latency rather than nominal device speed.
Flash is written in pages and erased in larger blocks, so a device cannot overwrite data in place; it writes new data elsewhere and later reclaims blocks through garbage collection, copying still-valid pages as it goes [9]. That copying causes write amplification, which consumes endurance and performance; it depends on overprovisioning and on how the device chooses blocks to reclaim, and separating data with different lifetimes reduces it [12]. He et al. describe the implicit contract that SSD clients must follow for good performance, including issuing large or parallel requests and grouping data that will be discarded together, so that garbage collection need not copy it [34]. Log-structured designs, which write sequentially and clean segments later, descend from the log-structured file system [35] and underlie most flash caches. TRIM and deallocation tell the device which data is no longer needed, which helps keep write amplification down [9].
A hybrid cache keeps a DRAM tier and spills items evicted from it to flash, promoting them back on access. CacheLib, the caching engine behind many services at Meta, supports such hybrid caches to hold large working sets [36]. Its flash engine routes items by size: a small-object cache uses a set-associative hash on the device with a Bloom filter to avoid needless reads and a minimal DRAM index, while a large-object cache appends to large regions in a log-structured layout with a compact DRAM index [37]. Earlier designs followed the same principles; Twitter’s fatcache kept an index in DRAM, stored keys and values on SSD, and appended writes in a log so that a hit needed one SSD read [38].
Tiny objects are hard to cache on flash. A log-structured layout needs a DRAM index entry per object, which becomes expensive with billions of objects, while a set-associative layout rewrites a whole flash page for each small insert, which wears the device. Kangaroo combines a small log, which batches tiny objects, with a large set-associative store, so that each set rewrite carries many objects and both DRAM use and flash writes stay low [39]. Nemo, a recent preprint, argues that even on devices with low device-level write amplification, rewriting whole sets for small inserts still dominates, and proposes ways to raise set fill and reduce index memory [40].
Because every write consumes endurance, deciding what enters the flash tier matters as much as what leaves it. Flashield uses DRAM as a filter and admits to flash only objects predicted to be read often and rarely updated, writing them in large batches [41]. Baleen learns admission and prefetching for flash caches in front of disk storage, under a flash write budget, optimizing backend disk time rather than miss rate [42]. Paper 2 discusses learned admission in more detail.
New NVMe interfaces let the host tell the device which data belongs together, so that data with different lifetimes does not share erase blocks. Zoned Namespaces (ZNS) expose zones that must be written sequentially and reset explicitly; the host gains control but takes on sequential-write discipline and its own garbage collection [43]. A zone-optimized version of CacheLib, described in a preprint, shows the engineering involved [44], and a study of cache workloads finds that the benefit of ZNS depends on the workload [45]. Flexible Data Placement (FDP), ratified by NVM Express, is a lighter model: writes carry a placement handle that steers them to a reclaim unit, the device still performs garbage collection, and software unaware of FDP runs unchanged [11]. Allison et al. used FDP to separate CacheLib’s small-object and large-object writes, reducing device write amplification and easing the trade-off between overprovisioning and endurance [46], and a recent preprint examines FDP for databases such as MySQL and RocksDB [47]. FairyWREN goes further, co-designing a cache’s admission and eviction with flash garbage collection on such interfaces to cut total writes, extend device life and reduce cost and embodied carbon [48]. Host placement fixes write amplification at the device level; a cache must still avoid its own rewrite overhead [40].
Database buffer pools are DRAM caches over storage, and fast NVMe changes how they should be built. LeanStore showed that a lightweight buffer manager can stay close to in-memory performance when data fits in DRAM while paging larger data sets to flash [49]. Umbra applied the idea to evolve an in-memory database into an SSD-based one, combining a large in-memory buffer with fast SSDs [5]. Haas and Leis found that existing out-of-memory systems use only a fraction of what modern NVMe drives can do, and that asynchronous, highly parallel I/O with lightweight buffer management closes the gap [4]. Virtual-memory-assisted buffer management uses hardware address translation while keeping the database in control of faulting and eviction [50]. Established engines adapt their settings to flash: MySQL’s documentation advises turning off neighbor-page flushing, an optimization for spinning disks, and enabling TRIM for SSD storage [51]. Storage engines also tier internally. RocksDB can extend its DRAM block cache with a secondary cache on non-volatile media, including a CacheLib-based implementation [52], and can place its coldest data on a cheaper medium by temperature [53]; both features are labeled experimental.
Products take different approaches to what stays in DRAM, and the difference matters for sizing. Table 2 summarizes four documented approaches.
| Product feature | What stays in DRAM | What goes to flash | Notes from the documentation |
|---|---|---|---|
| Redis Flex (Redis Software and Redis Cloud) | Key indexes, dictionaries and the hot working set | Warm keys and values | Replaces Auto Tiering; not a durable store, so persistence still needs RDB or AOF; locally attached flash required |
| Redis Auto Tiering (earlier versions) | All keys and hot values | Warm values | Supported up to Redis 7.4 databases |
| Amazon ElastiCache data tiering (Valkey or Redis OSS) | All keys and hot values | Warm values | A managed-service feature; values move back to memory on access |
| Memcached extstore | Hash table, keys, metadata and a pointer per item | Values above a size threshold | A cache, not a store; a restart effectively empties flash |
| Aerospike hybrid memory | Primary index | Record data | A database rather than a cache; other storage modes available |
Redis Flex is generally available in Redis Software from version 8.0.2 and is the tiering option for Redis 8.0 databases; it keeps hot data in RAM, moves warm data to locally attached flash, promotes data read from flash back to RAM, and suits workloads whose working set is much smaller than the data set [54]. Its documentation notes that Redis Search on Flex is in beta and that some capabilities, such as Active-Active, are not supported [54]. Memcached’s extstore keeps keys in RAM and flushes larger values from the cold end of its LRU through write buffers into sequentially written pages [55]. ElastiCache data tiering moves infrequently accessed values to local SSD when DRAM fills and back on access, while keys stay in memory [56]. Aerospike’s default architecture keeps the primary index in memory and record data on SSD [57]. When keys stay in DRAM, key size and key count bound how much data a node can hold; when keys move too, as in Flex, the DRAM budget shifts to indexes and the hot set.
A large cache that restarts empty can take a long time to refill, and the backend must absorb the misses in the meantime; paper 1 described how this can trigger overload. CacheLib keeps its DRAM cache in shared memory so that a restarted process on the same machine reattaches to a full cache, falling back to a cold start after an unclean shutdown; its authors report that hit ratios suffer badly without warm restart and that large hybrid caches can take days to warm again [36], [58]. Redis reloads data from snapshots or an append-only log at startup, so its restart is a reload from disk whose time grows with the data set [59]. Memcached’s extstore, by contrast, treats flash as cache space that a restart effectively empties [55]. Warm-restart behavior is therefore a property to check before relying on a tiered cache.
The same tiering pattern now appears in language-model serving, where attention KV caches are large and expensive to recompute. CachedAttention keeps the KV caches of conversation history in a hierarchy of memory and storage and overlaps slow-tier access with computation [60]. Mooncake pools the CPU memory, DRAM and SSD of a serving cluster into a disaggregated KV cache, trading storage for recomputation [61]. LMCache moves KV caches from accelerator memory to CPU memory, local SSD and remote stores, including Redis and Valkey [62]. Paper 3 of this series describes these systems in the context of caching for LLM applications; here they show that DRAM, flash and remote tiers serve AI workloads by the same principles as database caches.
Table 3 compares the design approaches in this paper. The ratings are qualitative and relative to each other; actual behavior depends on the hardware, software versions and workload.
| Approach | Capacity per cost | Access cost relative to DRAM | Endurance concern | Software effort | Best-fit workloads |
|---|---|---|---|---|---|
| DRAM-only cache | Low | Baseline | None | Low | Working sets that fit in memory |
| DRAM plus CXL memory with OS tiering | Medium | Low to Medium | None | Low to Medium (platform support) | Memory-bound services with many cold pages |
| DRAM plus persistent memory | Medium | Low to Medium | Low | High (crash consistency) | Historical; lessons apply to slower memory tiers |
| Hybrid DRAM and flash cache | High | Medium for flash hits | High; needs admission control | Medium to High | Large working sets with skewed access |
| Flash cache with FDP or ZNS placement | High | Medium for flash hits | Reduced | High (ZNS) to Medium (FDP) | Write-heavy flash caches at scale |
| Database buffer pool over NVMe | High | Medium for misses | Medium | Built into the engine | Data sets larger than memory |
| Product tiering (Redis Flex, extstore, data tiering) | High | Medium for flash hits | Managed by the product | Low (configuration) | Working set much smaller than the data set |
Challenge. Every write to a flash tier consumes endurance, so admitting more data can raise hit ratio and shorten device life [42], [9]. Research direction. Admission policies with write budgets [41], [42] and co-design of caching with flash garbage collection [48]. Opportunity. Caches that treat device wear as a first-class objective would lower cost and embodied carbon [48], [46].
Challenge. Host placement reduces device-level write amplification, but a cache that rewrites whole sets for small inserts still writes much more than it stores [40]. Research direction. Log-plus-set designs [39], higher set fill and compact indexes [40]. Opportunity. Tiny-object caches with low write amplification and low DRAM use would make flash practical for the smallest items.
Challenge. With DRAM, CXL memory and flash in one system, placement decisions multiply, and placing the hottest data in the nominally fastest tier can be wrong under load [33]. Research direction. Probabilistic and tunable migration [18], workload-specific provisioning of memory tiers [3], and latency-balancing placement [33]. Opportunity. Unified placement that spans memory and flash tiers would replace separate, uncoordinated policies.
Challenge. Real CXL devices behave differently from emulation [24], and the economics of pooling are contested [1], [26]. Research direction. Measurement on real devices [24], database designs for CXL [27], [29], [28], and software support for tiering in the operating system [25]. Opportunity. Clear guidance on when CXL expansion or pooling pays would let platform teams adopt it with confidence.
Challenge. Large tiered caches can take a long time to refill after a restart, and a cold cache shifts load to the backend [36]. Research direction. Shared-memory reattachment [58], persistent flash tiers that survive restarts, and controlled warm-up. Opportunity. Tiered caches that restart warm by default would remove a common cause of incidents.
Challenge. The break-even point between tiers changes with prices, device speeds and cloud billing [13], [15]. Research direction. Revisits of the five-minute rule for the cloud [15] and for very fast SSDs [16]. Opportunity. Tools that recompute tier sizing from live prices and access traces would keep caches cost-effective as hardware changes.
Challenge. Byte-addressable persistence moved crash consistency into applications, where bugs were common [20], [21]. Research direction. Systematic crash testing [21] and transactional libraries [20]. Opportunity. If persistent memory returns, for example over CXL [10], these tools and lessons would shorten the path to reliable software.
Challenge. KV caches for language models are large, and moving them between tiers competes with serving [61], [60]. Research direction. KV-cache layers that span accelerator memory, CPU memory, SSD and remote stores [62], [61]. Opportunity. The tiering techniques of database caching, including admission, endurance-aware placement and warm restart, can make AI serving cheaper.
Start by measuring the working set and the re-reference intervals of the data, and size the DRAM tier from them; use the five-minute reasoning to decide what the next tier should hold. Consider a flash tier when the working set is much smaller than the data set and flash hits are acceptable for the workload, and plan for endurance: control admission, prefer write-friendly layouts, and consider devices with Flexible Data Placement where the software supports it. Treat CXL memory as an emerging option to evaluate on real devices with operating-system tiering enabled. Check how each product keeps keys and values, how it behaves on restart, and whether it is durable, and keep persistence and failover separate from the cache tier.
For tiered in-memory caching, Bassirah works with Redis as a Strategic Technology Partner; Redis Flex keeps hot data in RAM and warm data on locally attached flash, with the limitations its documentation states. Other products and projects named in this paper are ecosystem references. In each case, validate the design on representative workloads, failure scenarios and versions before relying on it.
Product and project names are trademarks of their respective owners. Their mention describes publicly documented technology and does not imply a business relationship, except where Bassirah names a Strategic Technology Partner.
About this paper.
A technology survey of published research and publicly documented systems. It does not report Bassirah benchmarks or customer results. Product and project names are trademarks of their respective owners; their mention does not imply a business relationship, except where Bassirah names a Strategic Technology Partner.
THE SERIES
The foundation paper covers the core patterns; each research paper takes one frontier in depth.
Reusing answers and computation by meaning, with the correctness, access control and evaluation questions it raises.
Tracking what cached data depends on, so that changes invalidate exactly what they should.
Machine learning for eviction and admission decisions, from approximating the optimal policy to production-ready designs.
Bring one workload and its freshness requirements to a short architecture workshop. We will map it to the strategies in this paper and plan how to validate the design.