Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
RAM usage increses with redis #692
We are using redis as a cache store for our application . Each key is set with a TTl(Time to live) so that the cache store will not grow . But even though the number of keys stored was less and memory size occupied showed 2gb with the redis-cli INFO command . But the actual RAM usage of the system was huge , it was around 80 gb . AOF is also turned off .
Can you please let me know why the memory usage is so high .
Probably because at a point, Redis actually needed the 80 Gb of memory. Like most Unix/Linux applications, Redis is often unable to give the memory back to the system once it has been allocated. This is just the way memory allocators work on Unix/Linux. You can check the used_memory_peak[_human] field in INFO to confirm it.
There are many reasons Redis may accumulate memory:
It is difficult to say what happened for your application without more information.