Eviction policy

184 views
Skip to first unread message

Shane Marsh

unread,
Apr 23, 2021, 5:06:35 AM4/23/21
to Kvrocks
Hi, Just had a quick question about kvrocks eviction strategy. 

I am very new to RocksDB and have a limited knowlege of Redis. Obviously Redis has cache many eviction strategies when memory becomes full.  I can't allow Kvrocks to continually consume unlimited amounts of disk space. I have max-db-size set to 0 (as recommended) so what will kvrocks do in terms of managing SSD space.

1) Absolutely nothing. Kvrocks will keep consuming until something goes kaput!
2) Compact down to 16GB as per: rocksdb.wal_size_limit_mb or is this in-memory?
3) Some other inbuilt undocumented mechanism where keys are removed. 

Please advise. 

Shane

hulk

unread,
Apr 23, 2021, 7:41:11 AM4/23/21
to Kvrocks
Hello Shane, 

For 1) and 3):

The kvrocks was designed as storage instead of cache, so there's no eviction actually, and it
would be unable to write after exceeding the max DB size or disk space.

For 2):

rocksdb.wal_size_limit_mb was used to control the total size of WAL and it would affect how archived logs will be deleted.

mainly in-memory was block cache indeed which control by `rocksdb.metadata_block_cache_size` and `rocksdb.subkey_block_cache_size`

Shane Marsh

unread,
Apr 23, 2021, 9:04:20 AM4/23/21
to Kvrocks
Hi Hulk, 

Ok that makes sense, thank for replying. If you ever do decide to implement some type of eviction policy I'd absolutely welcome that. In the meantime I'll keep an eye on disk usage. 

Shane :)
Reply all
Reply to author
Forward
0 new messages