Skip to content

Commit 1cf56ef

Browse files
authoredFeb 15, 2022
Update rocksdb.go (#218)
1 parent 9ea19a1 commit 1cf56ef

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed
 

‎rocksdb.go

+2
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ func NewRocksDB(name string, dir string) (*RocksDB, error) {
3737

3838
opts := gorocksdb.NewDefaultOptions()
3939
opts.SetBlockBasedTableFactory(bbto)
40+
// SetMaxOpenFiles to 4096 seems to provide a reliable performance boost
41+
opts.SetMaxOpenFiles(4096)
4042
opts.SetCreateIfMissing(true)
4143
opts.IncreaseParallelism(runtime.NumCPU())
4244
// 1.5GB maximum memory use for writebuffer.

0 commit comments

Comments
 (0)
Please sign in to comment.