Skip to content

Improve compactor blocks cleaner when running with a large number of tenants #3483

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

Merged

Conversation

pracucci
Copy link
Contributor

What this PR does:
I'm testing the compactor in a cluster with a large number of tenants (6K) and I've found out the blocks cleaner doesn't scale. The problem is that cleaning 1 tenant at a time is too slow, so I'm proposing to add concurrency to it.

Which issue(s) this PR fixes:
N/A

Checklist

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

Signed-off-by: Marco Pracucci <marco@pracucci.com>
Signed-off-by: Marco Pracucci <marco@pracucci.com>
@pracucci pracucci requested a review from pstibrany November 11, 2020 08:45
@@ -270,7 +273,8 @@ func (c *Compactor) starting(ctx context.Context) error {
DataDir: c.compactorCfg.DataDir,
MetaSyncConcurrency: c.compactorCfg.MetaSyncConcurrency,
DeletionDelay: c.compactorCfg.DeletionDelay,
CleanupInterval: util.DurationWithJitter(c.compactorCfg.CompactionInterval, 0.05),
CleanupInterval: util.DurationWithJitter(c.compactorCfg.CompactionInterval, 0.1),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Increased a bit the jitter.

Copy link
Contributor

@pstibrany pstibrany left a comment

Choose a reason for hiding this comment

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

LGTM, nice! I've left some non-blocking nits.

Signed-off-by: Marco Pracucci <marco@pracucci.com>
@pracucci
Copy link
Contributor Author

Thanks @pstibrany, I've addressed all your comments!

@pracucci pracucci merged commit c1f0eb1 into cortexproject:master Nov 11, 2020
@pracucci pracucci deleted the add-blocks-cleaner-concurrency branch November 11, 2020 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 participants