From 18a4ce2bd7bb941bf3b0fe31a0445cdb80f1bcf5 Mon Sep 17 00:00:00 2001 From: Anthony Fieroni Date: Fri, 1 Apr 2022 10:55:19 +0300 Subject: [PATCH] Increase LRU cache, limit write buffer Signed-off-by: Anthony Fieroni --- src/dbwrapper.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dbwrapper.cpp b/src/dbwrapper.cpp index 54e6263cf5..95bcdbf203 100644 --- a/src/dbwrapper.cpp +++ b/src/dbwrapper.cpp @@ -100,8 +100,8 @@ static void SetMaxOpenFiles(leveldb::Options *options) { static leveldb::Options GetOptions(size_t nCacheSize) { leveldb::Options options; - options.block_cache = leveldb::NewLRUCache(nCacheSize / 2); - options.write_buffer_size = nCacheSize / 4; // up to two write buffers may be held in memory simultaneously + options.block_cache = leveldb::NewLRUCache(nCacheSize); + options.write_buffer_size = nCacheSize / 10; // up to 10 write buffers may be held in memory simultaneously options.filter_policy = leveldb::NewBloomFilterPolicy(10); options.compression = leveldb::kNoCompression; options.info_log = new CDefiLevelDBLogger();