Skip to content

Commit

Permalink
feat: Add log message to indicate that we are running an optimized TS…
Browse files Browse the repository at this point in the history
…M compaction on a single generation
  • Loading branch information
devanbenz committed Dec 16, 2024
1 parent 8058fd3 commit 98199f0
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tsdb/engine/tsm1/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -2167,12 +2167,13 @@ func (e *Engine) compact(wg *sync.WaitGroup) {
level3Groups = level3Groups[1:]
}
case 4:
// From testing, I've found that 10_000 (10x) default points per block
// is suitable for when we have a single generation with multiple files at max block
// From testing, I've found that 100_000 is suitable for when we have a
// single generation with multiple files at max block
// size under 2 GB. In order to further compact these files the points per block needs
// to be upped.
// to be increased.
if genLen == 1 {
e.Compactor.Size = tsdb.DefaultMaxPointsPerBlock * 10
e.logger.Info("TSM optimized compaction on single generation running, increasing total points be block to 100_000.")
e.Compactor.Size = tsdb.DefaultMaxPointsPerBlock * 100
} else {
e.Compactor.Size = tsdb.DefaultMaxPointsPerBlock
}
Expand Down

0 comments on commit 98199f0

Please sign in to comment.