首页 > 解决方案 > AWS ElastiCache redis 和 maxmemory

问题描述

我正在运行配置了节点类型 cache.r5.xlarge 的 AWS Elasticache Redis。根据配置,最大内存应为 28261849702 (28G)。这是从

https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/ParameterGroups.Redis.html#ParameterGroups.Redis.NodeSpecific

但是,当连接到 redis 端点时,它只显示 19G:

(来自“信息”命令)

# Memory
...
maxmemory:21196387277
maxmemory_human:19.74G
maxmemory_policy:volatile-lru
...

我想知道是否有人可以解释这种差异?

标签: amazon-web-servicesredis

解决方案


找到了原因:有一个默认为 25(百分比)的 reserved-memory-percent。这是特定于 AWS 的事情,而不是 Redis 本身的一部分。


推荐阅读