-
Notifications
You must be signed in to change notification settings - Fork 646
Add config option to exclude 'le' from series sharding to ingesters / partitions #12815
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM%C
"validation.max-cost-attribution-cardinality": 2000, | ||
"validation.cost-attribution-cooldown": 0, | ||
"ruler.evaluation-delay-duration": 60000000000, | ||
"ruler.evaluation-consistency-max-delay": 0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Know where this diff came from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return | ||
} | ||
|
||
h = HashAdd32(h, l.Name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose it wouldn't improve anything to include the label name in the hash as all series in foo_seconds_histogram
have that label, correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think adding just the label name makes any practical difference.
… partitions Signed-off-by: Marco Pracucci <[email protected]>
Signed-off-by: Marco Pracucci <[email protected]>
4bd5b2d
to
32cf5f2
Compare
Tested in a dev environment and doesn't solve the issue we're experiencing, so switch it back to draft while I keep investigating it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docs look good! I left a few minor suggestions. Thank you!
* [ENHANCEMENT] Ingester: Improved the performance of active series custom trackers matchers. #12663 | ||
* [ENHANCEMENT] Compactor: Log sizes of downloaded and uploaded blocks. #12656 | ||
* [ENHANCEMENT] Ingester: Add `cortex_ingest_storage_reader_receive_and_consume_delay_seconds` metric tracking the time between when a write request is received in the distributor and its content is ingested in ingesters, when the ingest storage is enabled. #12751 | ||
* [ENHANCEMENT] Distributor: Add experimental configuration option `-distributor.sharding.exclude-classic-histogram-bucket-label` to compute the series hash – used for sharding – excluding the 'le' label. When this configuration option is set to true, all buckets of a classic histogram metric are stored in the same shard. #12815 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* [ENHANCEMENT] Distributor: Add experimental configuration option `-distributor.sharding.exclude-classic-histogram-bucket-label` to compute the series hash – used for sharding – excluding the 'le' label. When this configuration option is set to true, all buckets of a classic histogram metric are stored in the same shard. #12815 | |
* [ENHANCEMENT] Distributor: Add anexperimental configuration option, `-distributor.sharding.exclude-classic-histogram-bucket-label`, to compute the series hash, used for sharding, excluding the 'le' label. When you set this configuration option to true, all buckets of a classic histogram metric are stored in the same shard. #12815 |
"kind": "field", | ||
"name": "exclude_classic_histogram_bucket_label", | ||
"required": false, | ||
"desc": "When set to true, the distributor computes the series hash – used for sharding – excluding the 'le' label. This means that, when this configuration option is set to true, all buckets of a classic histogram metric are stored in the same shard. This configuration option should be set for distributors, rulers and ingesters.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"desc": "When set to true, the distributor computes the series hash – used for sharding – excluding the 'le' label. This means that, when this configuration option is set to true, all buckets of a classic histogram metric are stored in the same shard. This configuration option should be set for distributors, rulers and ingesters.", | |
"desc": "When set to true, the distributor computes the series hash, used for sharding, excluding the 'le' label. This means that when you set this configuration option to true, all buckets of a classic histogram metric are stored in the same shard. Set this configuration option for distributors, rulers, and ingesters.", |
What this PR does
In this PR I propose to add an experimental config option to exclude the
le
when compute the series hash, used for sharding to ingesters / partitions.This is to confirm whether the flakyness we see when querying the most recent data from classic histograms is due to inconsistent bucket values when the ingest storage is used. We see the similar issue in classic architecture, and apparently the issue disappear if this same exact change is done in Alloy remote storage sharding, but it still persist in the ingest storage architecture. My theory is that it's because Mimir suffers the same issue too, so I would like to experiment removing the
le
from classic histograms sharding.No measurable perf impact:
Which issue(s) this PR fixes or relates to
Ref: https://github.com/grafana/mimir-squad/issues/3263
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]
. If changelog entry is not needed, please add thechangelog-not-needed
label to the PR.about-versioning.md
updated with experimental features.