Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RAM usage increses with redis #692

Closed
divyaprabhanna opened this issue Oct 2, 2012 · 3 comments
Closed

RAM usage increses with redis #692

divyaprabhanna opened this issue Oct 2, 2012 · 3 comments

Comments

@divyaprabhanna
Copy link

Hi ,

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 .

@dspezia
Copy link
Contributor

dspezia commented Oct 6, 2012

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:

  • to store your own data
  • to buffer inbound or outbound traffic
  • to buffer a replication stream
  • to store the SLOWLOG

It is difficult to say what happened for your application without more information.

@ghost
Copy link

ghost commented Oct 6, 2012

Memory leak ??

@dspezia
Copy link
Contributor

dspezia commented Oct 6, 2012

AFAIK, there is no known memory leak in Redis. Anyway, if the used_memory value is low, it means Redis has correctly freed the memory.

@mattsta mattsta closed this as completed May 30, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants