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.