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

Expose more series size stats and use in lazy posting #7957

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

yeya24
Copy link
Contributor

@yeya24 yeya24 commented Dec 4, 2024

  • I added CHANGELOG entry for this change.
  • Change is not relevant to the end user.

Fixes #7955

Changes

  • Add new stats field to meta.json index_stats section, including series_p90_size, series_p99_size, series_p999_size and series_p9999_size.
  • Compactor will try to calculate p90 to p9999 quantile series size and write the stats to meta.json.
  • Add new flag estimated-series-size-stat to configure which stats to use for lazy posting. By default it is max but users can configure their own to p90 to p9999. I didn't call this flag lazy-expanded-posting-estimated-series-size-stat because this estimated series size might be used by other features in the future for estimation.
  • Lazy expanded posting uses the value above for series estimation.

Note:
For quantile series size calculation, I have tried both go-tdigest (already used by hedged requests feature) and DataDog/sketches-go. ddsketches-go seems 10s faster than go-tdigest when processing a block with 20M series. So I go with ddsketches-go in the implementation for performance.

Verification

Existing tests should still pass

@yeya24 yeya24 changed the title Expose more series size stats Expose more series size stats and use in lazy posting Dec 4, 2024
@yeya24 yeya24 force-pushed the expose-series-stats1 branch from 06c8d30 to 447cad7 Compare December 4, 2024 18:08
@yeya24 yeya24 requested a review from MichaHoffmann December 4, 2024 18:14
docs/components/store.md Outdated Show resolved Hide resolved
@yeya24
Copy link
Contributor Author

yeya24 commented Dec 9, 2024

Can you please take a look at this PR? @GiedriusS @MichaHoffmann

@yeya24 yeya24 force-pushed the expose-series-stats1 branch from 4f11043 to 95b8c17 Compare December 10, 2024 07:26
@yeya24 yeya24 force-pushed the expose-series-stats1 branch from bb3c830 to 9627fd6 Compare January 6, 2025 01:25
yeya24 added 3 commits January 8, 2025 22:50
Signed-off-by: Ben Ye <[email protected]>

resolve conflict

Signed-off-by: Ben Ye <[email protected]>
@yeya24 yeya24 force-pushed the expose-series-stats1 branch from 27c675e to e3c397b Compare January 9, 2025 07:20
Signed-off-by: Ben Ye <[email protected]>
@yeya24 yeya24 force-pushed the expose-series-stats1 branch from e3c397b to 27d4e07 Compare January 9, 2025 07:58
yeya24 added 2 commits January 9, 2025 00:23
Signed-off-by: Ben Ye <[email protected]>
Signed-off-by: Ben Ye <[email protected]>
cmd/thanos/store.go Outdated Show resolved Hide resolved
cmd/thanos/store.go Outdated Show resolved Hide resolved
Signed-off-by: Ben Ye <[email protected]>
@yeya24 yeya24 force-pushed the expose-series-stats1 branch from e2c72cf to df34e85 Compare January 9, 2025 17:04
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.

Store Gateway: use different stats for lazy posting series size estimation
2 participants