mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2024-12-14 11:58:02 +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>
10 lines
125 B
Bash
Executable file
10 lines
125 B
Bash
Executable file
#!/bin/sh
|
|
|
|
rm ./keys_*.txt
|
|
for i in `seq 1 $1`
|
|
do
|
|
echo "launching process $i to fill.."
|
|
./fill_db.py -f &
|
|
done
|
|
|
|
wait
|