Lock-free updates for HistogramSumCount #2961
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #2957
Similar to #2951
Changes
HistogramSumCount
Stress Test Results
I used the follow view configuration in the stress test SDK setup to provide empty bounds for the
Histogram
which in turn appliesHistogramSumCount
aggregation:To better understand the perf improvement, we need to look at two scenarios:
MetricPoint
. This was tested by running the following in theRun
method of stress test:MetricPoint
. This was tested by running the following in theRun
method of stress test:While there is a perf improvement in both the cases, there is a substantial improvement in the second case where there is high contention to update the same
MetricPoint
.For the first scenario, Loops/ second go up from ~20M to ~24M (~20% increase)
For the second scenario, Loops/second go up from ~5.8M to ~8.3M (~43% increase)
Here are the numbers for the 1st and 2nd scenario respectively:
main branch
With this PR