limit max open files for leveldbs

master
Oliver Tonnhofer 2013-05-13 15:28:39 +02:00
parent 00405b232b
commit aea54fd050
1 changed files with 1 additions and 0 deletions

1
cache/db.go vendored
View File

@ -140,6 +140,7 @@ func (c *Cache) open(path string) error {
opts := levigo.NewOptions()
opts.SetCache(levigo.NewLRUCache(1024 * 1024 * 50))
opts.SetCreateIfMissing(true)
opts.SetMaxOpenFiles(64)
// save a few bytes by allowing leveldb to use delta enconding
// for up to n keys (instead of only 16)
opts.SetBlockRestartInterval(128)