From b73d66f2a1f063e1e9f428ac2d2423e51dcf8738 Mon Sep 17 00:00:00 2001 From: Dennis E Date: Wed, 28 Nov 2018 09:27:02 -0800 Subject: [PATCH] .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. --- ethdb/database.go | 1 + 1 file changed, 1 insertion(+) diff --git a/ethdb/database.go b/ethdb/database.go index 6c62d6a386..803f0b1dc3 100644 --- a/ethdb/database.go +++ b/ethdb/database.go @@ -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)