Skip to content

Conversation

pracucci
Copy link
Contributor

What this PR does:
Currently there's no limit on the number of tenants concurrently synchronizing blocks in the querier and shipping blocks in ingester. This can lead to unpredictable high spikes in CPU and memory utilization when new blocks are compacted (remember that all blocks are compacted from the head nearly at the same time - see issue #2003).

In this PR I've introduced two flags to limit the concurrency:

  • -experimental.tsdb.ship-concurrency to limit the number of tenants concurrently shipping blocks in the ingester
  • -experimental.tsdb.bucket-store.tenant-sync-concurrency to limit the number of tenants concurrently synchronizing blocks in the querier

I've also introduced UserTSDB and kept a similar design to the one proposed in #1958 in order to reduce the effort to merge the two PRs.

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]

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.

Nice and clean!

(nit: I think that UserTSDB doesn't need to be exported, but maybe you have some plans with it)

Copy link
Contributor

@thorfour thorfour left a comment

Choose a reason for hiding this comment

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

🎉 Looks awesome, great change!

@pracucci pracucci force-pushed the fix-blocks-shipper-concurrency branch from a580258 to 50708c3 Compare January 24, 2020 10:07
@pracucci
Copy link
Contributor Author

I think that UserTSDB doesn't need to be exported, but maybe you have some plans with it

@pstibrany No real reason. I did it to simplify the merge with #1958 but shouldn't be too difficult if it's just 1 letter of difference, so I've unexported it.

@pracucci pracucci merged commit 17fcc6c into cortexproject:master Jan 24, 2020
@pracucci pracucci deleted the fix-blocks-shipper-concurrency branch January 24, 2020 11:34
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.

4 participants