increase write buffer size to 2gb

This commit is contained in:
Jan Pochyla 2017-09-13 01:51:34 +02:00
parent ebef53a66b
commit 235d0bdffa

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 {