From e572e77d9034172c9a53d2ad3be47fbe3cb9adc4 Mon Sep 17 00:00:00 2001 From: Goutham Veeramachaneni Date: Mon, 25 Jan 2021 19:12:18 +0100 Subject: [PATCH] Increase the buckets for compaction duration (#8342) We're seeing compactions that are taking hours in Cortex which this is missing. I know while it is not common in Prometheus, I am pretty sure there are setups where compaction takes longer than 512s. On our own Prometheus the average compaction duration is 566s. Signed-off-by: Goutham Veeramachaneni --- tsdb/compact.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tsdb/compact.go b/tsdb/compact.go index 8a6f670c4..747f08f9f 100644 --- a/tsdb/compact.go +++ b/tsdb/compact.go @@ -111,7 +111,7 @@ func newCompactorMetrics(r prometheus.Registerer) *compactorMetrics { m.duration = prometheus.NewHistogram(prometheus.HistogramOpts{ Name: "prometheus_tsdb_compaction_duration_seconds", Help: "Duration of compaction runs", - Buckets: prometheus.ExponentialBuckets(1, 2, 10), + Buckets: prometheus.ExponentialBuckets(1, 2, 14), }) m.chunkSize = prometheus.NewHistogram(prometheus.HistogramOpts{ Name: "prometheus_tsdb_compaction_chunk_size_bytes",