Tune RocksDB

This commit is contained in:
Martin Boehm 2018-02-26 18:42:55 +01:00
parent 32d99e56eb
commit 386b4f1db8

View File

@ -58,7 +58,7 @@ func openDB(path string) (*gorocksdb.DB, []*gorocksdb.ColumnFamilyHandle, error)
opts.SetMaxBackgroundCompactions(4) opts.SetMaxBackgroundCompactions(4)
opts.SetMaxBackgroundFlushes(2) opts.SetMaxBackgroundFlushes(2)
opts.SetBytesPerSync(1 << 20) // 1MB opts.SetBytesPerSync(1 << 20) // 1MB
opts.SetWriteBufferSize(1 << 24) // 16MB opts.SetWriteBufferSize(1 << 26) // 64MB
opts.SetMaxOpenFiles(25000) opts.SetMaxOpenFiles(25000)
opts.SetCompression(gorocksdb.NoCompression) opts.SetCompression(gorocksdb.NoCompression)
@ -75,7 +75,7 @@ func openDB(path string) (*gorocksdb.DB, []*gorocksdb.ColumnFamilyHandle, error)
optsOutputs.SetMaxBackgroundCompactions(4) optsOutputs.SetMaxBackgroundCompactions(4)
optsOutputs.SetMaxBackgroundFlushes(2) optsOutputs.SetMaxBackgroundFlushes(2)
optsOutputs.SetBytesPerSync(1 << 20) // 1MB optsOutputs.SetBytesPerSync(1 << 20) // 1MB
optsOutputs.SetWriteBufferSize(1 << 24) // 16MB optsOutputs.SetWriteBufferSize(1 << 26) // 64MB
optsOutputs.SetMaxOpenFiles(25000) optsOutputs.SetMaxOpenFiles(25000)
optsOutputs.SetCompression(gorocksdb.NoCompression) optsOutputs.SetCompression(gorocksdb.NoCompression)