increase write buffer size to 2gb

pull/1/head
Jan Pochyla 2017-09-13 01:51:34 +02:00
parent ebef53a66b
commit 235d0bdffa
1 changed files with 2 additions and 1 deletions

View File

@ -38,7 +38,8 @@ func NewRocksDB(path string) (d *RocksDB, err error) {
opts := gorocksdb.NewDefaultOptions()
opts.SetBlockBasedTableFactory(bbto)
opts.SetCreateIfMissing(true)
opts.SetMaxBackgroundCompactions(4)
opts.SetMaxBackgroundCompactions(8)
opts.SetWriteBufferSize(2 * 1024 * 1024 * 1024) // 2 gb
db, err := gorocksdb.OpenDb(opts, path)
if err != nil {