Aerospike Hybrid Memory Architecture: Balancing RAM Indexes with Flash Storage
Aerospike's Hybrid Memory Architecture splits storage between DRAM indexes and NVMe flash data. Here is how it works, how to size it, and what to watch for.
23 Mar 2026, 08:32 UTC

Your dataset has outgrown the server's RAM, but the application still needs sub-millisecond reads. Adding nodes helps, but DRAM is expensive per gigabyte, and at some point the memory bill dominates the infrastructure cost. Aerospike's Hybrid Memory Architecture (HMA) targets this exact gap: it keeps the index in DRAM and stores the actual record data—the bins—directly on NVMe flash.
The thesis is simple. You accept flash read latency for large records in exchange for a storage footprint that is no longer bounded by physical RAM. The index stays small enough to fit in memory, while the heavy payload lives on raw flash devices.
How HMA splits memory and storage
In a traditional in-memory database, every byte of every record sits in DRAM. Aerospike HMA changes that split. The primary index—a mapping from each primary key to the physical location of its record—lives in DRAM. The record data itself, including all bins, is written straight to NAND flash, bypassing the host filesystem entirely.
Because the index is in memory, a read still requires only one flash I/O to fetch the record. There is no separate metadata lookup on disk. Aerospike uses a distributed hash table (DHT) to decide which node owns a given key. Clients compute the hash locally, so there is no centralized coordinator to become a bottleneck.
The log-structured write path
Writes are not random overwrites. Aerospike buffers updates in a DRAM write buffer and appends them to flash in a log-structured fashion. This matters because NAND flash performs poorly with small random writes; rewriting individual blocks causes write amplification, where the device moves more data than the application actually changed. Appending sequentially reduces that overhead and helps sustain throughput on enterprise NVMe SSDs.
The trade-off is that old versions of records accumulate on flash. Aerospike runs background defragmentation to reclaim space, but during heavy write bursts you may see higher device utilization until those processes catch up.
A sizing example
The most common HMA mistake is sizing the flash tier correctly but underestimating the DRAM tier. Because the index cannot be paged to disk, the total index size must fit in the physical RAM of each node. Use the following table as a starting template, then confirm the exact bytes-per-index-entry value in the Aerospike Administration Guide for your version.
| Factor | What to check | Why it matters |
|---|---|---|
| Index memory | index_memory_used vs. node RAM | Index must fit in DRAM; it cannot page to disk |
| Flash capacity | disk_used vs. raw device size | Data lives on flash; filesystem overhead is bypassed |
| Write headroom | Defragmentation queue and stop-writes state | Prevents latency spikes and write rejections |
To inspect live metrics, run asinfo from an admin workstation or cluster node with network access to the Aerospike service port:
# Run on a cluster node or admin host with access to the service port
asinfo -h <node-ip> -p <service-port> -v <info-command>
The exact info command and metric names vary by release. Look for index_memory_used and disk_used in the response, and compare them against your node's physical limits. If index_memory_used approaches available RAM, the node is at risk of write rejection or OOM conditions, regardless of how much free flash remains.
Trade-offs and operational risks
- Enterprise NVMe is effectively mandatory. Consumer-grade disks may cause latency spikes because HMA assumes low, predictable flash latency.
- Index size is a hard ceiling. If your dataset has a very high record count with tiny records, the index alone can consume more RAM than the data would have in an all-memory configuration.
- Stop-writes thresholds need care. Improper configuration of the stop-writes threshold can lead to cluster unavailability during disk-full scenarios. Set it with enough headroom for defragmentation, but not so high that you reject writes prematurely.
Actionable next steps
- Calculate your projected index memory using the record count and the version-specific index entry size from the Administration Guide.
- Verify current usage with
asinfoon a running node, checkingindex_memory_usedanddisk_used. - Review your
stop-writesthreshold and defragmentation settings against your write throughput. - Benchmark with representative record sizes and read/write mixes before committing to production capacity.
HMA is not a universal replacement for all-memory deployments. It is a deliberate choice for datasets that exceed RAM capacity but still demand predictable, low-latency access. Size the index first, treat enterprise flash as a requirement, and monitor the write path.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.