How do I determine the actual available memory in my ElastiCache node?

2 minute read
0

I want to determine the actual available memory in my Amazon ElastiCache node.

Resolution

ElastiCache pricing shows the available memory in GiB for each supported node type. In the default parameter group, a percentage of the memory is reserved for backups and failover operations. When you create a new cluster with versions 4.0.10 or later, ElastiCache uses the reserved-memory-percent parameter. 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. For example, if a default parameter group cluster has 0.5 GiB of total memory, then the available memory is 0.375 GiB.

Note: ElastiCache uses the reserved memory in clusters for backups and failover operations. 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.

To view the available memory in an ElastiCache node, complete the following steps:

  1. Use redis-cli to connect to the cluster.

  2. To check the maxmemory value, run the info memory command.

    Example output:

    172.31.35.93:6379> info memory# Memorymaxmemory:402653184

    Important: The maxmemory value is in bytes. The Redis engine uses bytes or MB to represent memory. AWS documentation uses GiB to represent memory.

Related information

Managing reserved memory

AWS OFFICIAL
AWS OFFICIALUpdated 6 months ago