Skip to content

Commit

Permalink
badger: restore prev. max table size (64MiB; default).
Browse files Browse the repository at this point in the history
  • Loading branch information
raulk committed Nov 1, 2020
1 parent 72e573d commit 0b8a21e
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions node/repo/blockstore_opts.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,12 @@ func BadgerBlockstoreOptions(domain BlockstoreDomain, path string, readonly bool
opts.ValueLogLoadingMode = badgerbs.FileIO
opts.TableLoadingMode = badgerbs.MemoryMap

// Embed only values < 128 bytes in the LSM; larger values in value logs.
// Embed only values < 128 bytes in the LSM tree; larger values are stored
// in value logs.
opts.ValueThreshold = 128

// Reduce this from 64MiB to 16MiB. That means badger will hold on to
// 20MiB by default instead of 80MiB. This does not appear to have a
// significant performance hit.
opts.MaxTableSize = 16 << 20
// Default table size is already 64MiB. This is here to make it explicit.
opts.MaxTableSize = 64 << 20

// NOTE: The chain blockstore doesn't require any GC (blocks are never
// deleted). This will change if we move to a tiered blockstore.
Expand Down

0 comments on commit 0b8a21e

Please sign in to comment.