Skip to content

Commit

Permalink
Set max memtable size and set batch size accordingly
Browse files Browse the repository at this point in the history
  • Loading branch information
lahsivjar committed Aug 1, 2023
1 parent b719ec3 commit 8063f35
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion aggregators/aggregator.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ import (
)

const (
dbCommitThresholdBytes = 10 * 1024 * 1024 // commit every 10MB
memTableSize = 16 << 20 // 16 MBs
dbCommitThresholdBytes = 7 << 20 // Keep it smaller than half of memtable size
aggregationIvlKey = "aggregation_interval"
)

Expand Down Expand Up @@ -85,6 +86,7 @@ func New(opts ...Option) (*Aggregator, error) {
return &merger, nil
},
},
MemTableSize: memTableSize,
}
writeOptions := pebble.Sync
if cfg.InMemory {
Expand Down

0 comments on commit 8063f35

Please sign in to comment.