Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion storage/database/badger_database.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,15 @@ const (
// DefaultLogValueSize is 64 MB.
DefaultLogValueSize = 64 << 20

// PerformanceMaxTableSize is 3072 MB. The larger
// this value is, the larger database transactions
// storage can handle (~15% of the max table size
// == max commit size).
PerformanceMaxTableSize = 3072 << 20

// PerformanceLogValueSize is 256 MB.
PerformanceLogValueSize = 256 << 20

// DefaultCompressionMode is the default block
// compression setting.
DefaultCompressionMode = options.None
Expand Down Expand Up @@ -165,7 +174,8 @@ func PerformanceBadgerOptions(dir string) badger.Options {
opts.Compression = DefaultCompressionMode

// Use an extended table size for larger commits.
opts.MaxTableSize = DefaultMaxTableSize
opts.MaxTableSize = PerformanceMaxTableSize
opts.ValueLogFileSize = PerformanceLogValueSize

// Load tables into memory and memory map value logs.
opts.TableLoadingMode = options.MemoryMap
Expand Down