mant1988 / redis

Automatically exported from code.google.com/p/redis
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

cache-max-memory has no effect #422

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. set diskstore-enabled=yes and cache-max-memory=1GB
2. Continuously spam redis with SET requests
3. Memory usage continues to increase past 1GB until system memory is full and 
catastrophic failure occurs

What is the expected output? What do you see instead?
Redis should actively be flushing entries to the disk store once near or at the 
1GB RAM limit rather than continuing to grow

What version of the product are you using? On what operating system?
diskstore branch commit 5ab7bbfc270c7ee9bf1f7ccafcc5c6a148259425 (1/3/2011)
2.6.32-25-generic #45-Ubuntu SMP Sat Oct 16 19:52:42 UTC 2010 x86_64 GNU/Linux

Please provide any additional information below.
It seemed to exhibit this behavior both with cache-flush-delay at 0 as well as 
at values between 1 and 15 (I haven't tested all the cache-flush-delay 
scenarios exhaustively, my longest test had it set to 5).

Admittedly this test isn't the best since it consists entirely of SETs, but I 
wanted to see what happened to redis when it started hitting the RAM cache 
limit with a disk based backing store, and it's the fastest way to get there.  
When I left it running it kept going until all 20GB of system RAM were 
consumed.  Size of redis.ds is 3G.  Redis was eventually killed by the OS when 
RAM was exhausted.

Setting maxmemory in addition results in the usual errors being returned when 
RAM limit reached.

Original issue reported on code.google.com by chris.in...@gmail.com on 4 Jan 2011 at 3:27