Redis on Flash

Redis Enterprise allows for creation of Redis on Flash (RoF) databases that extend your DRAM capacity with SSD and persistent memory to store more significantly data with fewer resources, reducing costs. Redis on Flash is not designed to be used as an alternative mechanism for data persistence—the same AOF and snapshot data-persistence mechanisms are used with Redis on Flash. RoF is based on the core open-source Redis architecture with some primary enhancements:

  • Instead of keeping the entire dataset in DRAM, RoF keeps only the keys and the Redis dictionary (the data structure behind the keys) in DRAM, along with the “hot values” of the dataset (the working set). The “warm values,”  the lesser -sed portion of the dataset, are kept on the local Flash storage.
  • To avoid head-of-the line blocking scenarios resulting from the single-threaded nature of Redis, RoF is based on a multi-threaded asynchronous architecture that guarantees no blocking between a heavy request made to Flash and a light request made to DRAM.

This multi-layer memory architecture is shown here:

Redis Flash Memory Architecture Diagram

When to use RoF

RoF is ideal for the following use cases:

  • When your working set is significantly smaller than your dataset
  • When the average size of your keys is smaller than the average size of your values
  • When your database size (dataset + replication) is more than 100GB

 

When not to use RoF:

  • When the access to your dataset objects is completely random, i.e. your working set is the size of your dataset
  • When the average size of the keys in the dataset is about the same as that of the values
  • When the dataset size is small and has extremely high throughput requirements (>1M ops/sec)   

 

Adjusting the DRAM-to-Flash ratio

RoF allows you to adjust your DRAM-to-Flash ratio without changing the memory quota (DRAM+Flash) of your database:

  1. You can add more DRAM to your quota if more throughput is needed or latency must be reduced
  2. You can add more Flash to your quota if you are satisfied with your performance but would like to use less cluster resources

 

Note 1: DRAM-to-Flash is automatically adjusted for you when using Redis Enterprise as a fully managed service in a virtual private cloud (VPC). For on-premises/self-managed deployments, adjusting your DRAM:Flash ratio is as easy as moving a slider.

Note 2: A scale-out process may be triggered when adding more DRAM to your memory quota, and a scale-in process may be triggered when adding more Flash to your memory quota. These processes will be completely automated when using Redis Enterprise as a fully managed service on your VPC, but require manual intervention when Redis Enterprise software is self-deployed.   

 

The DRAM-to-Flash ratio adjustment is illustrated here:

Redis Flash RAM to Flash Diagram

 

Redis Flash Cluster Scale Out 2018

Storage engine

RoF is built on a pluggable storage engine architecture that supports the following storage engines by default:

  • RocksDB on x86 architectures
  • IBM Ark on Power8 architectures

Redis Labs engineers have provided key fixes to these engines to make them compatible with Redis.    

 

Performance

Redis on Flash is extremely fast; in well-optimized environments, RoF can run as fast as Redis on DRAM. In a recent benchmark performed over a single bare-metal Intel-based server equipped with Intel NVMe-based SSD cards, RoF achieved more than 3M ops/sec at sub-millisecond latency while transferring more than 1GB of data to and from the Flash memory:

More info about this benchmark can be found here.

 

With the recent support for NVMe-based SSDs in public clouds, our engineers have conducted a benchmark to compare the performance of the old SATA-based SSD running on AWS I2 instances with the new NVMe-based SSD running on AWS I3 instances. The results compared the performance of a single cloud instance from various types using different database object sizes:

More info about this benchmark can be found here.

Redis on Flash and persistent memory technology (e.g. 3DXPoint)

RoF is designed from the ground up to achieve the optimal performance over new persistent memory technologies like Intel 3DXPoint. Persistent memory is designed with DRAM and NAND (Flash) integrated in the same chipset, and the software that uses the chipset can control which part of the data should reside on the DRAM side of the chipset and which part should reside on Flash—exactly the way RoF works!

Intel’s persistent memory technology is currently used by two different products:

  1. Optane: a new NVMe-based SSD card
  2. Apache Pass: a non-volatile dual-inline memory module (NVDIMM)

 

The engineering teams from Intel and Redis Labs are working together to benchmark these products. The benchmark below compares Intel’s Optane-based NVMe with the P3700, a previous generation NVMe-based card:

Note: RoF benchmark son Intel Apache Pass will soon be published.


Next section  ►  Redis Search