rocksdb: remove the minimum on block cache size, add a comment

This commit is contained in:
Andronik Ordian 2019-04-11 23:10:25 +02:00
parent 85d6003a67
commit 4ddbe0317b
No known key found for this signature in database
GPG Key ID: C66F3C680DE0E6ED
1 changed files with 3 additions and 1 deletions

View File

@ -305,7 +305,9 @@ impl Database {
{
block_opts.set_block_size(config.compaction.block_size);
let cache_size = cmp::max(8 * MB, config.memory_budget() / 3);
// Set cache size as recommended by
// https://github.com/facebook/rocksdb/wiki/Setup-Options-and-Basic-Tuning#block-cache-size
let cache_size = config.memory_budget() / 3;
let cache = Cache::new(cache_size);
block_opts.set_cache(cache);
}