From e6d403a1b0edf3e6c5b6a96b97389775babf961c Mon Sep 17 00:00:00 2001 From: Jacob Gadikian Date: Tue, 15 Feb 2022 16:28:46 +0700 Subject: [PATCH] Update rocksdb.go --- rocksdb.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rocksdb.go b/rocksdb.go index 2211eea3a..dd9be2a36 100644 --- a/rocksdb.go +++ b/rocksdb.go @@ -37,6 +37,8 @@ func NewRocksDB(name string, dir string) (*RocksDB, error) { opts := gorocksdb.NewDefaultOptions() opts.SetBlockBasedTableFactory(bbto) + // SetMaxOpenFiles to 4096 seems to provide a reliable performance boost + opts.SetMaxOpenFiles(4096) opts.SetCreateIfMissing(true) opts.IncreaseParallelism(runtime.NumCPU()) // 1.5GB maximum memory use for writebuffer.