Skip to content

Commit

Permalink
Increase LRU cache, limit write buffer (#1182)
Browse files Browse the repository at this point in the history
Signed-off-by: Anthony Fieroni <[email protected]>
  • Loading branch information
bvbfan authored Apr 15, 2022
1 parent 91a5003 commit 798a35d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/dbwrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 798a35d

Please sign in to comment.