1
0
Fork 0
mirror of https://github.com/dragonflydb/dragonfly.git synced 2024-12-14 11:58:02 +00:00
dragonflydb-dragonfly/tools
Yue Li 00f1e3d578
feat(server): perform eviction upon memory pressure in cache mode (#2084)
* 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>
2023-11-01 11:11:27 -07:00
..
docker fix: alpine weekly pipeline (#1811) 2023-09-06 08:27:40 +00:00
eviction feat(server): perform eviction upon memory pressure in cache mode (#2084) 2023-11-01 11:11:27 -07:00
local/monitoring Add renderer to grafana (#739) 2023-02-01 13:26:07 +02:00
packaging fix(ubuntu-prod): Set suexec hash correctly (#2029) 2023-10-16 13:31:20 +03:00
balls_bins.py chore: add balls and bins simulator (#2001) 2023-10-11 01:18:29 +03:00
cache_logs_player.py Cache logs player batching (#623) 2022-12-30 12:29:11 +03:00
cache_testing.py fix: improvements to caching tool 2023-01-11 15:11:37 +02:00
cluster_mgr.py test(cluster): Extend cluster_mgr.py (#1426) 2023-06-20 10:13:57 +03:00
defrag_db.py tools: Hash defrag script (#1723) 2023-08-22 09:11:34 +03:00
defrag_mem_test.py chore(server): upgrade mimalloc for v2.0.7 2022-12-26 13:08:54 +02:00
json_benchmark.py feat(server): JSON family using JSON type (#561) 2022-12-14 19:25:10 +02:00
release.sh fix(build): verify build image for releases (#664) 2023-01-10 15:46:20 +02:00
requirements.txt chore(deps): bump redis from 4.3.4 to 4.4.4 in /tools (#1221) 2023-05-17 10:13:59 +03:00