Skip to content

Improve compaction efficiency#1145

Merged
joe-elliott merged 6 commits intografana:mainfrom
joe-elliott:improve-compaction-efficiency
Dec 2, 2021
Merged

Improve compaction efficiency#1145
joe-elliott merged 6 commits intografana:mainfrom
joe-elliott:improve-compaction-efficiency

Conversation

@joe-elliott
Copy link
Copy Markdown
Collaborator

@joe-elliott joe-elliott commented Dec 1, 2021

What this PR does:
In multitenant environments tenants with long blocklists can be starved of work from the compactors. This is in part due to the compactionCycle wait time. Reducing this hardcoded value to improve the rate at which a compactor will move through all tenants.

  • Reduce compactionCycle to delay just enough to prevent a tight loop that eats CPU for no reason.
  • Increase waitOnStartup to account for the loss of 30s in the compactionCycle. This might not be necessary but making the change to reduce the impact of this PR.
  • Added a new config parameter max_compaction_cycle that allows the polling cycle and the compaction cycle to be independently configured.
  • Regenned manifest

Which issue(s) this PR fixes:
Fixes #

Checklist

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

Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Copy link
Copy Markdown
Contributor

@KMiller-Grafana KMiller-Grafana left a comment

Choose a reason for hiding this comment

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

Docs portion of this PR looks good to me.

Copy link
Copy Markdown
Contributor

@mapno mapno left a comment

Choose a reason for hiding this comment

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

lgtm

Comment thread modules/storage/config.go Outdated
Signed-off-by: Joe Elliott <number101010@gmail.com>
@joe-elliott joe-elliott merged commit bd99a24 into grafana:main Dec 2, 2021
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