Adding new shards didn't increase the total available memory

0

Hi there!

I'm trying to horizontally scale a redis cluster running on elasticache.

I originally had 2 shards, with one replica each (4 nodes in total), running on m3.micro, and before doing any change, I ran INFO MEMORY via redis-cli, and maxmemory_human was at 416.25M.

I tried to add a third shard, but the result of maxmemory_human remains at 416.25M. Am I missing something here? Does maxmemory_human represent the entire memory space available for storing data in redis?

Thanks in advance!

digui
gefragt vor 4 Jahren971 Aufrufe
1 Antwort
0

Hi Digui,

Thanks so much for reaching out to the AWS Forum.

In this example, maxmemory_human refers to the total memory available to the current connected node. Each shard will show the available memory on the individual node. For example, if I have a t3.micro in cluster-mode-enabled. Each shard in this configuration will show 384.00M in memory which is the total instance type memory, less the reserved-memory (25% default).

A better way to understand the total memory available in your cluster is to take the number of shards ** maxmemory_human. In my example, I have 2 shards, so the total memory available is 384M ** 2 or 768M.

You can also monitor the usage on the node using a new ElastiCache metric called DatabaseMemoryUsagePercentage. You can view more here as well:https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheMetrics.Redis.html.

You can also find more details on the memory available to ElastiCache based on this support article: https://aws.amazon.com/premiumsupport/knowledge-center/available-memory-elasticache-redis-node/

Best,
Zach

beantwortet vor 4 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen