mant1988 / redis

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

Diskstore evicting keys after cache-max-memory exceeded #558

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What version of Redis you are using, in what kind of Operating System?
master branch from github, also scripting branch
on linux 64bit aws ec2 large server 

What is the problem you are experiencing?
If diskstore is enabled, keys will be evicted from the database after 
cache-max-memory is exceeded

What steps will reproduce the problem?
1)build master branch

Option A:
2)enable diskstore, leave cache-max-memory at zero
3)try to set a key
4)there will be no keys in the database

Option B:
2)enable diskstore, set cache-max-memory to some amount
3)try to set keys until the cumulative size of their values is greater than 
that amount
4)after passing the cache-max-memory amount, keys will randomly be deleted from 
the database

Please provide any additional information below.
Keys are deleted from the database after cache-max-memory is exceeded in a 
random fashion. The only pattern I can detect is that is only deletes enough 
keys to bring the remaining keys total value sizes under cache-max-memory size

Original issue reported on code.google.com by mike.huf...@gmail.com on 21 May 2011 at 8:52

GoogleCodeExporter commented 8 years ago
i think what you are seeing is the expected behavior with diskstore. keys are 
not "deleted" from the database, they are simply swapped out of memory and 
stored on disk. if you access such a key again, it is swapped back in.

EXISTS works as expected, whether the key is in memory or not -- but KEYS 
returns only the keys which are currently in memory, which is different from 
the normal semantics.

Original comment by t...@lossen.de on 22 May 2011 at 8:06

GoogleCodeExporter commented 8 years ago
sorry, diskstore is now discontinued.

Original comment by anti...@gmail.com on 14 Sep 2011 at 3:43