-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[processor/cumulativetodelta] Heavy memory usage of histograms #13751
Labels
Comments
Link to issue requesting histogram support in Cumulative to Delta Processor: #12423 |
@balintzs is this something you plan to work on? |
TylerHelmuth
added
priority:p2
Medium
processor/cumulativetodelta
Cumulative To Delta processor
labels
Sep 1, 2022
@TylerHelmuth, yes we have already started working on it. |
codeboten
pushed a commit
that referenced
this issue
Sep 21, 2022
#13751) (#14007) Currently a MetricIdentity struct is allocated for each count/sum/bucket of a histogram which means that all of the attributes for the datapoint are duplicated across each component within the datapoint. This change bundles the histogram values into one unit (HistogramValue) to be converted, which requires only one MetricIdentity, reducing memory footprint.
we found the cause of the memory issue and opened a PR with the fix: #14729 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem Description:
The Cumulative to Delta processor needs to record all numerical values of cumulative datapoints in order to calculate the difference between them. Values are stored based on their identity, which contains all resource, scope and datapoint attributes.
For histograms, the sum, the count and all bucket counts are stored as separate values. This causes huge spikes of heap memory usage when a large number of histogram datapoints pass through the processor.
The following screenshots show the heap memory allocation bytes and working set bytes for the same amount of data:
A) With Cumulative to Delta Processor turned on:
B) With Cumulative to Delta Processor turned off:
Proposed Solution:
After discussing the issue with @mistodon, we believe that instead of treating each numerical value in a histogram datapoint separately, we should store them together under a single entity, and add handling for calculating the delta of each value contained within.
The text was updated successfully, but these errors were encountered: