Re: Redis memory usage with maxmemory set

102 views
Skip to first unread message

Yiftach Shoolman

unread,
Oct 30, 2012, 2:11:23 AM10/30/12
to redi...@googlegroups.com
From the redis.conf file under the "LIMIT" section there is a paragraph that explains that:

When the memory limit is reached Redis will try to remove keys with an
# EXPIRE set. It will try to start freeing keys that are going to expire
# in little time and preserve keys with a longer time to live.
# Redis will also try to remove objects from free lists if possible.
I guess the above marked yellow sentence explains that 


On Tue, Oct 30, 2012 at 12:55 AM, sb56637 <sb5...@gmail.com> wrote:
Hi,

I'm using Redis with Drupal 6 as a cache. I have maxmemory set to 50M, and I'm using maxmemory-policy allkeys-lru. I'm coming from memcached, so please excuse my observation, but Redis memory usage doesn't make sense to me. I was expecting it to slowly ramp up and then when it hits the limit evict old keys and replace them with new ones, thus maintaining appoximately the same constant maximum memory usage from then on. But instead, it reaches approximately 50MB, and then drops way down to about 20MB or even 16, and then ramps back up. Can anybody explain this behavior?

Thanks!

--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To view this discussion on the web visit https://groups.google.com/d/msg/redis-db/-/icPJ7w08HKAJ.
To post to this group, send email to redi...@googlegroups.com.
To unsubscribe from this group, send email to redis-db+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/redis-db?hl=en.



--

Yiftach Shoolman
+972-54-7634621

sb56637

unread,
Oct 30, 2012, 7:54:15 AM10/30/12
to redi...@googlegroups.com
On Tuesday, October 30, 2012 1:11:27 AM UTC-5, Yiftach wrote:
From the redis.conf file under the "LIMIT" section there is a paragraph that explains that:

When the memory limit is reached Redis will try to remove keys with an
# EXPIRE set. It will try to start freeing keys that are going to expire
# in little time and preserve keys with a longer time to live.
# Redis will also try to remove objects from free lists if possible.
I guess the above marked yellow sentence explains that 

 
Hmm, my redis.conf doesn't have that section. I'm running 2.6.2. What is a "free list"?

In short, it seems that the eviction policy is too agressive.
Reply all
Reply to author
Forward
0 new messages