-
Notifications
You must be signed in to change notification settings - Fork 812
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
Enable active series metrics in the ingester by default #4257
Enable active series metrics in the ingester by default #4257
Conversation
This change calculates and exports the `cortex_ingester_active_series` by default. Up to this point, the metric was disabled by default since calculating it consumes some amount of memory. The original PR (#3153) estimated for 1M active series at least 40MB and up to another 200MB depending on our luck reusing labels from the ref cache. We (Grafana) have been running with this setting enabled on our ingesters for some time and the resource usage doesn't appear to be significant. This feature appears to add between 1.2 - 1.6% in memory usage when enabled: ~140MB out of a total of ~10GB of memory used per ingester. The ingesters I measured this on * Have multiple tenants running production workloads * Have about 1.3M active series each * Have about a 10GB working set (as measured by `kubectl top` and exported k8s metrics) Based on this and the utility of the metric itself, I'd like to enable it by default. Screenshots of the pprof heap output attached. Signed-off-by: Nick Pillitteri <[email protected]>
Signed-off-by: Nick Pillitteri <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Appreciate the detailed analysis. Thanks!
One optional nit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Signed-off-by: Nick Pillitteri <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you.
Up to this point, the metric was disabled by default since calculating it consumes some amount of memory.
That's not the only reason. Main reason is that everybody does a calculation of active series differently.
This feature was introduced because after switch from chunks to blocks engine, "in memory series" started to be computed differently. To make it more configurable and compatible with computation in chunks storage, we have introduced "active series" metrics.
Signed-off-by: Nick Pillitteri [email protected]
What this PR does:
This change calculates and exports the
cortex_ingester_active_series
metric by default. Up to this point, the metric was disabled by default since
calculating it consumes some amount of memory.
The original PR (#3153) estimated for 1M active series at least 40MB
and up to another 200MB depending on our luck reusing labels from the
ref cache.
We (Grafana) have been running with this setting enabled on our ingesters
for some time and the resource usage doesn't appear to be significant.
This feature appears to add between 1.2 - 1.6% in memory usage when
enabled: ~140MB out of a total of ~10GB of memory used per ingester.
The ingesters I measured this on
kubectl top
and exportedk8s metrics)
Based on this and the utility of the metric itself, I'd like to enable it
by default.
Screenshots of the pprof heap output attached.
Checklist
- [ ] Tests updatedCHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]