Skip to content

Commit e6d403a

Browse files
authored
Update rocksdb.go
1 parent 9ea19a1 commit e6d403a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

rocksdb.go

Lines changed: 2 additions & 0 deletions
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)