4

I'm using a redis memory store on dotcloud but despite expiring keys its used_memory never drops back down again. Using flushdb or flushall from redis-cli doesn't cause the used_memory to drop from it's ~20Mb. I've had the same problem on RedisToGo.

Anyone know how am I managing to fill it up? and how can I avoid doing this? Perhaps there are certain characters you shouldn't put into redis values or keys? I'm using it with EM and resque from a heroku rails app.

Chris Morgan
  • 73,264
  • 19
  • 188
  • 199
AJP
  • 21,889
  • 17
  • 76
  • 108
  • 1
    Hi, I suggest posting the output of the INFO command to provide more information about your issue. – antirez Sep 23 '12 at 23:52
  • I don't know the answer to this question, I'm asking for my own edification: I know that many processes never release their memory back to the OS, but instead, just re-use whatever they've already allocated. Does a redis process actually relinquish memory back to the OS? Or does it just hold onto it for future use? – DavidO Sep 24 '12 at 06:03

1 Answers1

0

Redis also has a mem_fragmentation_ratio (eg: 2.5), so using both values would likely lead to more accurate measurements. At very low used_memory levels (eg: near-zero) the fragmentation can be quite high, and to mitigate this you would need to stop/start the redis instance manually.

RedisToGo may be reporting real memory usage in this manner, as a combination of used_memory x mem_fragmentation_ratio.

Adrian
  • 1,322
  • 9
  • 9