From 798a35d05437a0e1932f110e4e557de9c0488efa Mon Sep 17 00:00:00 2001 From: Anthony Fieroni Date: Fri, 15 Apr 2022 12:26:07 +0300 Subject: [PATCH] Increase LRU cache, limit write buffer (#1182) 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();