From 98199f0a12c7b9e9434be666b047bf6e32299912 Mon Sep 17 00:00:00 2001 From: Devan Date: Mon, 16 Dec 2024 12:38:26 -0600 Subject: [PATCH] feat: Add log message to indicate that we are running an optimized TSM compaction on a single generation --- tsdb/engine/tsm1/engine.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tsdb/engine/tsm1/engine.go b/tsdb/engine/tsm1/engine.go index e6e09095389..af9cfd1cb48 100644 --- a/tsdb/engine/tsm1/engine.go +++ b/tsdb/engine/tsm1/engine.go @@ -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 }