Skip to content

MQE Series Metadata memory tracker #11219

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

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

lamida
Copy link
Contributor

@lamida lamida commented Apr 14, 2025

What this PR does

Which issue(s) this PR fixes or relates to

Fixes #

Checklist

  • Tests updated.
  • Documentation added.
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX].
  • about-versioning.md updated with experimental features.

lamida added 3 commits April 14, 2025 15:10
Signed-off-by: Jon Kartago Lamida <me@lamida.net>
Signed-off-by: Jon Kartago Lamida <me@lamida.net>
Signed-off-by: Jon Kartago Lamida <me@lamida.net>
Comment on lines 223 to 227
if sm, isSeriesMetadata := any(s).(SeriesMetadata); isSeriesMetadata {
for _, l := range sm.Labels {
estimatedBytes += uint64(len(l.Name)+len(l.Value)) * StringSize
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should tackle incorporating the label memory consumption in a separate PR - this will require a number of changes in a number of places, not just in this pools like this.

It may also be worthwhile raising a Prometheus PR to add something like a ByteSize() method to labels.Labels, so we can cheaply get the size of a labels.Labels without iterating over all the labels like this.

Signed-off-by: Jon Kartago Lamida <me@lamida.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants