tweak leveldb blockrestartinterval

master
Oliver Tonnhofer 2013-05-08 09:10:56 +02:00
parent 166a6dff02
commit 905df4f3e6
1 changed files with 3 additions and 0 deletions

3
cache/db.go vendored
View File

@ -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))
}