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

store-gateway: reduce series size estimation #4962

Merged
merged 1 commit into from
May 11, 2023

Conversation

dimitarvdimitrov
Copy link
Contributor

What this PR does

Related to #4593

The 64KiB size estimation for series was inherited from Thanos. The PR which adds this to Thanos (PR 1985) didn't give any explanation for why 64KiB was chosen. Based on some rough estimation we think that we can bring this number down in order to reduce the volume of fetched data.

Citing @pracucci

Assuming a worst case scenario of 1 sample /sec, in a 24h block we have 744 chunks per series.
The worst case scenario of each meta ref is 83=24 bytes, so 74424 = 17856 bytes.

This PR also moves this constant to the tsdb package which contains similar constants.

Which issue(s) this PR fixes or relates to

Fixes #

Checklist

  • [n/a] Tests updated
  • [n/a] Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

The 64KiB size estimation for series was inherited from Thanos. The PR which adds this to Thanos didn't give
any explanation for why 64KiB was chosen. Based on some rough estimation we think that we can bring this number down
in order to reduce the volume of fetched data.

Citing Marco
> Assuming a worst case scenario of 1 sample /sec, in a 24h block we have 744 chunks per series.
> The worst case scenario of each meta ref is 8*3=24 bytes, so 744*24 = 17856 bytes.

Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
Copy link
Collaborator

@pracucci pracucci left a comment

Choose a reason for hiding this comment

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

I agree, LGTM!

@dimitarvdimitrov dimitarvdimitrov merged commit eeb1628 into main May 11, 2023
21 checks passed
@dimitarvdimitrov dimitarvdimitrov deleted the dimitar/st-gw/reduce-series-size-estimation branch May 11, 2023 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants