I want to determine the actual available memory in my Amazon ElastiCache node.
Resolution
To view the available memory in GiB for each support node type, see ElastiCache pricing.
In the default parameter group, ElastiCache reserves a percentage of the memory for backups and failover operations. For clusters that you create with ElastiCache for Redis OSS versions 4.0.10 or later, ElastiCache uses the reserved-memory-percent parameter to manage backups and failover operations. It's a best practice to reserve 25% of the total memory for these clusters.
Amazon ElastiCache Serverless clusters set the reserved-memory-percent value to 25% by default. You can't modify this setting.
Note: If you reduce the reserved-memory-percent in the parameter group, then this change might affect backup or failover operations. This can cause failures during high loading.
The actual available memory for use depends on the reserved-memory-percent parameter that's set for the cluster. This is the maxmemory.
For example, if a Redis cluster uses the cache.t3.micro node type with the default parameter group, then the cluster has 0.5 GiB of total memory. For this cluster the reserved-memory-percent parameter is set to 25%. So, the available memory is 0.5 GiB - 25% = 0.375 GiB.
To view the actual available memory for an ElastiCache node, complete the following steps:
- Connect to the cluster.
- To check the Memorymaxmemory value, run the info memory command.
Example output:
172.31.35.93:6379> info memory# Memorymaxmemory:402653184
Important: The Memorymaxmemory value is in bytes. The Redis engine uses bytes or MB to represent memory. AWS documentation uses GiB to represent memory. In the preceding example, 402653184 bytes is equal to 0.375 GiB.
Related information
Managing reserved memory for ElastiCache for Valkey and ElastiCache for Redis OSS