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

Reduce the number of series that are kept in memory while streaming from ingesters #4745

Merged
merged 1 commit into from
Jun 3, 2022

Conversation

harry671003
Copy link
Contributor

@harry671003 harry671003 commented Jun 2, 2022

Signed-off-by: 🌲 Harry 🌊 John 🏔 [email protected]

What this PR does:
Addresses an issue where the stream response is left in the memory which increases the overall memory consumption.
Keeping a reference to resp will also mean that 3x the series (duplicate data fetched from all ingesters) is kept in memory.

Before this fix:
Screen Shot 2022-06-02 at 3 17 33 PM

After this fix:
Screen Shot 2022-06-02 at 4 03 57 PM

Which issue(s) this PR fixes:
Fixes #

Checklist

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

@harry671003 harry671003 force-pushed the streaming_bug_fix branch 4 times, most recently from 7101c6d to 8c81743 Compare June 3, 2022 16:06
Signed-off-by: 🌲 Harry 🌊 John 🏔 <[email protected]>
@harry671003 harry671003 changed the title Fix a bug in MetricsForLabelMatchersStream Reduce the number of series that are kept in memory while streaming from ingesters Jun 3, 2022
@alanprot
Copy link
Member

alanprot commented Jun 3, 2022

That's a nice improvement! LGTM

@alanprot alanprot merged commit 8a416fc into cortexproject:master Jun 3, 2022
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.

3 participants