Skip to content

change adaptive way to EMA#7401

Merged
friedrichg merged 3 commits into
cortexproject:masterfrom
SungJin1212:Change-dynamic-symbols-capa
Apr 7, 2026
Merged

change adaptive way to EMA#7401
friedrichg merged 3 commits into
cortexproject:masterfrom
SungJin1212:Change-dynamic-symbols-capa

Conversation

@SungJin1212
Copy link
Copy Markdown
Member

In #7398, I introduced an adaptive way to calculate the dynamicSymbolsCapacity, but if a single abnormally large request (e.g., 8,000 symbols) was processed, the capacity was permanently stuck at that peak value.
This PR implements an Exponential Moving Average (EMA) so that the dynamicSymbolsCapacity can be decreased according to workloads.

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]

Signed-off-by: SungJin1212 <tjdwls1201@gmail.com>
Signed-off-by: SungJin1212 <tjdwls1201@gmail.com>
@SungJin1212 SungJin1212 force-pushed the Change-dynamic-symbols-capa branch from d57e10a to c390495 Compare April 7, 2026 13:31
@SungJin1212 SungJin1212 requested a review from friedrichg April 7, 2026 13:31
Copy link
Copy Markdown
Member

@friedrichg friedrichg left a comment

Choose a reason for hiding this comment

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

LGTM

@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Apr 7, 2026
Comment thread pkg/cortexpb/timeseriesv2.go Outdated
Signed-off-by: Friedrich Gonzalez <1517449+friedrichg@users.noreply.github.com>
@friedrichg friedrichg merged commit 4e7841b into cortexproject:master Apr 7, 2026
64 of 65 checks passed
@yeya24
Copy link
Copy Markdown
Contributor

yeya24 commented Apr 8, 2026

I expect to see benchmark results for this and the previous PR. Can we run some tests to understand how much this helps?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size/S type/performance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants