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

Consider using sharded compactor from mimir-prometheus for vertical block splitting. #5890

Open
fpetkovski opened this issue Nov 11, 2022 · 0 comments

Comments

@fpetkovski
Copy link
Contributor

fpetkovski commented Nov 11, 2022

Is your proposal related to a problem?

The Thanos compactor is currently not able to split blocks vertically during the compaction process. It will compact blocks until compact.block-max-index-size is reached, after which it will add a no-compaction marker and exclude that block from future compaction plans.

For high-churn use cases, we can often reach this limit very soon and end up with very small blocks that never get downsampled because they do not get reach the minimum 40h range.

For low-churn cases, we can end up compacting blocks that have a very long duration, which are then served by a single store-gateway instance instead of being distributed across many different ones.

Describe the solution you'd like

In a Slack discussion, @pstibrany suggested we look into the mimir-prometheus compactor which has a CompactWithSplitting method. We can use this component as a building block to do vertical-block splitting once the maximum index size of a block has been reached.

Describe alternatives you've considered

There is an old proposal to implement vertical block splitting: #4191. Whether we follow this approach or not, we can still use the mimir-prometheus compactor to avoid reimplementing block splitting.

Additional context

The mimir-prometheus codebase has an Apache2 license.
Link to Slack discussion: https://cloud-native.slack.com/archives/CL25937SP/p1668151046513269

Example of highly fragmented tenant blocks in S3 due to high churn leading to large index size for receiver shards:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant