Redis on Flash: Extend DRAM capacity with Redis SSD

Redis Enterprise allows for creation of Redis on Flash (RoF) databases that extend your DRAM capacity with SSD and persistent memory to store significantly more 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-used 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 on Flash technology page illustration

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:

rof-technology-page-illustration-02.

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 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.

Our engineers have conducted tests with the AWS’ I4i instances and with the RoF’s new Speedb data engine compared to AWS’ i3 instances. RoF is now even faster with the I4i instances, at 30% total cost-of-ownership of DRAM-based instances. 

The graph below shows the scaling what AWS’ I4i on Speedb with different read:write ratios:

More info about this benchmark can be found here.

The graph below shows the overall 3.7x performance improvement.


Next section  ►  Redis Enterprise Cluster Architecture