RAM usage increses with redis #692

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

Comments

Projects
None yet
4 participants
@divyaprabhanna

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

This comment has been minimized.

Show comment Hide comment
@dspezia

dspezia Oct 6, 2012

Contributor

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.

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.

@oddmarthon-lende

This comment has been minimized.

Show comment Hide comment
@oddmarthon-lende

oddmarthon-lende Oct 6, 2012

Memory leak ??

Memory leak ??

@dspezia

This comment has been minimized.

Show comment Hide comment
@dspezia

dspezia Oct 6, 2012

Contributor

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.

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 May 30, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment