Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Redis "evicted_keys" purpose

Tags:

redis

While executing the info command in redis-cli, all the information related to that server is listed. What is the purpose of "evicted_keys"?

like image 203
vijay Avatar asked Feb 13 '12 13:02

vijay


1 Answers

Redis can be configured to automatically purge keys as necessary. If so configured, redis will only use a maximum amount of memory, and if it nears the limit, remove keys per some criteria. See Redis as an LRU cache by antirez.

It can be configured to only remove keys that have an expiry time, or all keys. It can remove keys soon to be expired, last recently used keys, or random keys.

evicted_keys in the info is the number of keys that have been evicted (removed).

like image 144
Linus Thiel Avatar answered Jan 03 '23 13:01

Linus Thiel