.ldb filesize 2MB=>128MB

Changes the level0 .ldb file size from the default of 2MB to 128MB.
This reduces the number of files in the db directory substantially, helping to reduce the amount of filesystem overhead required to manipulate the db.
This commit is contained in:
Dennis E 2018-11-28 09:27:02 -08:00
parent a7501d0c41
commit b73d66f2a1

View file

@ -78,6 +78,7 @@ func NewLDBDatabase(file string, cache int, handles int) (*LDBDatabase, error) {
BlockCacheCapacity: cache / 2 * opt.MiB,
WriteBuffer: cache / 4 * opt.MiB, // Two of these are used internally
Filter: filter.NewBloomFilter(10),
CompactionTableSize: 128 * opt.MiB,
})
if _, corrupted := err.(*errors.ErrCorrupted); corrupted {
db, err = leveldb.RecoverFile(file, nil)