Skip to content

Commit

Permalink
Update rocksdb.go (#218)
Browse files Browse the repository at this point in the history
  • Loading branch information
faddat authored Feb 15, 2022
1 parent 9ea19a1 commit 1cf56ef
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rocksdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 1cf56ef

Please sign in to comment.