Documentation - Redise Pack

A guide to Redise Pack installation, operation and administration

open all | close all

Memory Mangement with Redis Enterprise Pack (RP)

By default, RP manages a node’s memory so data is entirely in RAM for performance reasons. The exception to this is RP’s Redis Enterprise Flash feature where Flash memory (SSDs) can be used to store data too. If there’s not enough RAM available, RP does not allow inserting of more data into databases. This limitation is intentional and ultimately beneficial. It is detrimental to RP for the OS to take control of allocating memory and spill some data to the swap, thus managing memory on RP’s behalf. RP has been designed to know better than the OS what it needs and when it needs it. RP protects the existing data and prevents the database from being able to store data into the shards. It can be configured to move the data to another node, or even discard it. This depends on eviction policy set on a database by the administrator.

With this memory management style, comes the responsibility to monitor the nodes, clusters, databases, etc., but you are already doing that, right?

What happens when Redis Enterprise Pack is low on RAM?

If free RAM is low, RP will automatically attempt to migrate shards to other nodes, (if there are any) to free RAM on this node. If that is not possible, RP instructs shards to release memory (which can cause data loss if eviction policy allows it, or OOM replies). If shards cannot free memory, then RP depends on the OS’s OOM killer to kill slaves (but tries to avoid killing masters).

All that said, as always it is best practice to have a proper monitoring platform that will alert you proactively well before a system gets to this point. Maintaining a properly sized cluster is critical to a healthy RP installation and is a day to day responsibility like most databases.