Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve compaction efficiency #1145

Merged
merged 6 commits into from
Dec 2, 2021

Conversation

joe-elliott
Copy link
Member

@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
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
Member

@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

modules/storage/config.go Outdated Show resolved Hide resolved
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