mirror of
https://github.com/dragonflydb/dragonfly
synced 2024-11-21 15:11:20 +00:00
00f1e3d578
* fixes #1936 Eviction Implementation This patch provides a very simple eviction implementation for the interface mentioned above. In my opinion, the eviction algorithm approximates an LRU policy given that normal buckets always store the most recently accessed data while stash buckets are holding less active data. The algorithm first selects a small set of segments as eviction targets. Starting from the last slot of the last stash bucket in each of the segments, we walk backward to evict key-value pairs stored in each visited slot. The eviction stopped either when a target memory release goal or the max number of evicted key-value pairs is reached. Therefore, we can upper bound the eviction time through the following two parameters that can be set when DF starts. Note that these two parameters could be retrieved and changed by user through CONFIG GET and CONFIG SET commands. --------- Signed-off-by: Yue Li <61070669+theyueli@users.noreply.github.com> |
||
---|---|---|
.. | ||
docker | ||
eviction | ||
local/monitoring | ||
packaging | ||
balls_bins.py | ||
cache_logs_player.py | ||
cache_testing.py | ||
cluster_mgr.py | ||
defrag_db.py | ||
defrag_mem_test.py | ||
json_benchmark.py | ||
release.sh | ||
requirements.txt |