tweak leveldb blockrestartinterval
parent
166a6dff02
commit
905df4f3e6
|
@ -126,6 +126,9 @@ func (c *Cache) open(path string) error {
|
|||
opts := levigo.NewOptions()
|
||||
opts.SetCache(levigo.NewLRUCache(1024 * 1024 * 50))
|
||||
opts.SetCreateIfMissing(true)
|
||||
// save a few bytes by allowing leveldb to use delta enconding
|
||||
// for up to n keys (instead of only 16)
|
||||
opts.SetBlockRestartInterval(128)
|
||||
if levelDbWriteBufferSize != 0 {
|
||||
opts.SetWriteBufferSize(int(levelDbWriteBufferSize))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue