increase write buffer size to 2gb
This commit is contained in:
parent
ebef53a66b
commit
235d0bdffa
@ -38,7 +38,8 @@ func NewRocksDB(path string) (d *RocksDB, err error) {
|
|||||||
opts := gorocksdb.NewDefaultOptions()
|
opts := gorocksdb.NewDefaultOptions()
|
||||||
opts.SetBlockBasedTableFactory(bbto)
|
opts.SetBlockBasedTableFactory(bbto)
|
||||||
opts.SetCreateIfMissing(true)
|
opts.SetCreateIfMissing(true)
|
||||||
opts.SetMaxBackgroundCompactions(4)
|
opts.SetMaxBackgroundCompactions(8)
|
||||||
|
opts.SetWriteBufferSize(2 * 1024 * 1024 * 1024) // 2 gb
|
||||||
|
|
||||||
db, err := gorocksdb.OpenDb(opts, path)
|
db, err := gorocksdb.OpenDb(opts, path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user