feat: enable out-of-order samples - #468
Merged
Merged
Conversation
sinapah
marked this pull request as ready for review
September 11, 2026 16:46
5 tasks
Contributor
|
Contributor
|
Some things to consider:
|
MichaelThamm
approved these changes
Sep 11, 2026
5 tasks
This was referenced Sep 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
Fixes #185 and fixes #465.
Read this blog by upstream to understand what the design of this feature looks like: https://grafana.com/blog/new-in-grafana-mimir-introducing-out-of-order-sample-ingestion/. There is also a brief discussion on the tradeoffs of enabling it when it comes to CPU and memory use.
Solution
Add a charm config option called
out_of_order_time_window, named after the upstream config name that is disabled by default. It's a string that accepts the time units s, m, etc.Context
Testing Instructions
Deploy this bundle:
juju config mimir out_of_order_time_window=5m.This is what the Grafana Explore page should look like.

Performance concerns
To test whether enabling this time window negatively and noticeably impacts memory and CPU use among Mimir worker pods, I used


sudo k8s kubectl topto continously monitor CPU and memory use at 10s intervals for 15 minutes before (baseline) and after the change. The CSV files are attached here.mimir_resource_usage_baseline.csv
mimir_resource_usage_after.csv
I then plotted the CPU and memory use comparison plots.
Similar to the findings in https://grafana.com/blog/new-in-grafana-mimir-introducing-out-of-order-sample-ingestion/, memory use didn't noticeably change. In both the read and write pods before and after the change, memory fluctuated in ways that implied the enabling of out-of-order sample ingestion was not to blame.
A minor note here is that as this experiment was going on, I was querying the Mimir datasource in Grafana automatically ever 5s. This querying flow would test the memory use of the Mimir read units.
The same is more or less the same for CPU.
Upgrade Notes
This needs to be backported to track 3 and also implemented in Prometheus (canonical/prometheus-k8s-operator#564).