Skip to content

Compaction load metric#1144

Merged
mapno merged 9 commits intografana:mainfrom
mapno:compaction-load-metric
Dec 2, 2021
Merged

Compaction load metric#1144
mapno merged 9 commits intografana:mainfrom
mapno:compaction-load-metric

Conversation

@mapno
Copy link
Copy Markdown
Contributor

@mapno mapno commented Dec 1, 2021

What this PR does:

Adds new metric to measure compaction load. It counts the number of blocks that are yet to be compacted before the next maintenance cycle. It's higher, the greater the compaction load is.

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

Copy link
Copy Markdown
Contributor

@mdisibio mdisibio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice addition, should be very helpful for compactor scaling and troubleshooting.

Comment thread tempodb/compactor.go Outdated
@mapno mapno force-pushed the compaction-load-metric branch from 5191b1a to bbb0571 Compare December 2, 2021 13:54
Comment thread tempodb/compactor.go
rw.blocklist.Update(tenantID, newBlocks, oldBlocks, newCompactions)
}

func measureOutstandingBlocks(tenantID string, blockSelector CompactionBlockSelector) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 moving this into its own method. cleans up doCompaction() nicely

@mapno mapno merged commit 678f31c into grafana:main Dec 2, 2021
@mapno mapno deleted the compaction-load-metric branch December 2, 2021 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants