mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
ethdb/leveldb: use larger table files to decrease filesys load
This commit is contained in:
parent
a54142987c
commit
18b41bdd42
1 changed files with 6 additions and 4 deletions
|
|
@ -95,6 +95,8 @@ func New(file string, cache int, handles int, namespace string) (*Database, erro
|
|||
BlockCacheCapacity: cache / 2 * opt.MiB,
|
||||
WriteBuffer: cache / 4 * opt.MiB, // Two of these are used internally
|
||||
Filter: filter.NewBloomFilter(10),
|
||||
CompactionTableSize: 4 * opt.MiB,
|
||||
CompactionTableSizeMultiplierPerLevel: []float64{1, 2, 4, 8, 8, 8, 8}, // Cap at 32MB files, higher explodes disk IO
|
||||
})
|
||||
if _, corrupted := err.(*errors.ErrCorrupted); corrupted {
|
||||
db, err = leveldb.RecoverFile(file, nil)
|
||||
|
|
|
|||
Loading…
Reference in a new issue