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

proposal: Added proposal for vertical block sharding (limit size of block) #3390

Closed
wants to merge 1 commit into from

Conversation

bwplotka
Copy link
Member

@bwplotka bwplotka commented Nov 2, 2020

Related to #1424 and #3068

Signed-off-by: Bartlomiej Plotka [email protected]


* Add [`Cuckoofilter`](https://github.com/seiflotfy/cuckoofilter) to improve query performance on store GW as well with vertically sharded blocks.

![Why Cuckoo filter: https://bdupras.github.io/filter-tutorial/](../img/cuckoo-pros.png)
Copy link

Choose a reason for hiding this comment

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

This image is missing? https://bdupras.github.io/filter-tutorial/ link works 👍

@stale
Copy link

stale bot commented Jan 30, 2021

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale label Jan 30, 2021
@bwplotka
Copy link
Member Author

bwplotka commented Jan 31, 2021 via email

@stale stale bot removed the stale label Jan 31, 2021
Base automatically changed from master to main February 26, 2021 16:30
Copy link
Member Author

@bwplotka bwplotka left a comment

Choose a reason for hiding this comment

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

Some thoughts in our 1:1 with @Biswajitghosh98

type: proposal
menu: proposals
status: proposed
owner: @bwplotka
Copy link
Member Author

Choose a reason for hiding this comment

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

Feel free @Biswajitghosh98 to put yourself too

of 2w time range compaction for Thanos this can result compaction to be not that effecting, casing block to grow to enormous sizes (1TB with index
sizes over 60 GBs)
* Recently Thanos and Prometheus enabled [vertical compaction](../components/compact.md#vertical-compactions) (under hidden flag). This introduced
abilities to do backfilling (importing blocks) and offline deduplications.
Copy link
Member Author

Choose a reason for hiding this comment

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

One more case when this is happening:

Huge Receiver rings are building potentially arbitrary size blocks for same tenants, so even simple case like:

We have 6 receive and a single tenant. We configure hashing to distribute write load to 6 instances. Let's simplify the case by saying there is no replication. This will create 6 huge blocks. Now compactor will group them into huge one.

* There is known limitation for Prometheus index file size. It can't exceed 64GB due to [uint32 used for postings](https://grafana.com/blog/2019/10/31/lifting-the-index-size-limit-of-prometheus-with-postings-compression/),
see [issue](https://github.com/thanos-io/thanos/issues/1424) and [code](https://github.com/prometheus/prometheus/blob/3d8826a3d42566684283a9b7f7e812e412c24407/tsdb/index/index.go#L279).
While there is work to lift this limitation and allow bigger indexes, there will be **some** other limit anyway.
* Compaction is not streaming bytes directly from & to object storage (yet). This is due to its current index format, which is [being worked on](https://github.com/thanos-io/thanos/issues/3389).
Copy link
Member Author

Choose a reason for hiding this comment

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

It is worth mentioning the current status. Chunk streaming is possible on disk and is being scheduled (not worked on yet), but index streaming is not possible currently and won't be for longer time.


**We propose to vertically shard all blocks which goes beyond the specified index size limit during the compaction process.**

* Special metadata in meta.json indicating a shard.
Copy link
Member Author

Choose a reason for hiding this comment

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

  • One problem to solve, is how to perform compaction from X sources that output in Y (where Y > 1) blocks.
  • How to ensure multiple compactors can distribute compaction without strong coordination.
  • How to ensure multiple store gateways can exclude certain blocks from lookup process without directly touching them. (aka Bloom/Cuckoo filter)

@stale
Copy link

stale bot commented Jun 2, 2021

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale label Jun 2, 2021
@stale stale bot closed this Jun 9, 2021
@bwplotka bwplotka reopened this Jun 11, 2021
@stale stale bot removed the stale label Jun 11, 2021
@bwplotka bwplotka closed this Jun 11, 2021
@bwplotka bwplotka reopened this Jun 23, 2022
@bwplotka
Copy link
Member Author

Relevant, but far in progress, unfortunately.

@bwplotka
Copy link
Member Author

Newer version #4191

@bwplotka bwplotka closed this Jun 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants