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

feat(blooms): limit bloom size during creation #12796

Merged
merged 5 commits into from
Apr 26, 2024

Conversation

owen-d
Copy link
Member

@owen-d owen-d commented Apr 25, 2024

Adds the ability to short-circuit bloom creation when the constructed bloom exceeds a certain size. Should help OOM prevention creating blooms for the long-tail of series which have tons of data.

This is a stop-gap fix for a more effective solution (better stream sharding, splitting blooms, etc)

Signed-off-by: Owen Diehl <ow.diehl@gmail.com>
@owen-d owen-d requested a review from a team as a code owner April 25, 2024 19:02
@github-actions github-actions bot added the type/docs Issues related to technical documentation; the Docs Squad uses this label across many repositories label Apr 25, 2024
Signed-off-by: Owen Diehl <ow.diehl@gmail.com>
# generated bloom filter exceeds this size will be discarded. A value of 0 sets
# an unlimited size. Default is 100MB.
# CLI flag: -bloom-compactor.max-bloom-size
[bloom_compactor_max_bloom_size: <int> | default = 100MB]
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we set the default to the same value as MaxQueryPageSize, which is 64MiB?

Copy link
Member Author

@owen-d owen-d Apr 25, 2024

Choose a reason for hiding this comment

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

Yeah, I can do that 👍

edit: It's kind of a pain to align them to a single source of truth (they also use two different bytesize impls... yuck), so I'm just going to leave it as is. I also like the idea of having it above the default filter level a bit so we can change the read path slightly without reindexing.

Signed-off-by: Owen Diehl <ow.diehl@gmail.com>
Signed-off-by: Owen Diehl <ow.diehl@gmail.com>
…creation-size

Signed-off-by: Owen Diehl <ow.diehl@gmail.com>
@owen-d owen-d enabled auto-merge (squash) April 26, 2024 18:45
@owen-d owen-d merged commit eac5622 into grafana:main Apr 26, 2024
60 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/L type/docs Issues related to technical documentation; the Docs Squad uses this label across many repositories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants