-
Notifications
You must be signed in to change notification settings - Fork 887
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
ExemplarReservoir default and performance hits #3952
Comments
Additional note about non-histograms (counters/gauge/updowncounter): |
So,
Thanks @cijothomas for this feedback! Let me know your preferences around 2 + 3. |
For 1. @CodeBlanch is the perf expert and is already actively working on that! We have thread-local random generator and other usual perf suspects taken care of. I'd also love to see the overhead in other languages for non-histograms. (I'll share .NET perf numbers here for easy comparison shortly). |
Here are some benchmark numbers for counter in .NET. These have all of the optimizations I have come up with so far.
On my box turning on exemplars has a constant ~6ns perf hit. For the "With*Labels" runs it is less significant because the time spent finding the metric point to update for the supplied tags dwarfs the exemplar costs. But for "CounterHotPath" where there are no tags supplied, we optimize/cheat and bypass the lookup using a known metric point index. For that case the 6ns seems really expensive compared to the overall processing time. |
|
Default filter for Exemplars is "WithTrace", not AlwaysOn. Do you have a benchmark w/ our default of 10% trace sampling? I assume it should cut down the overhead by a good bit. Also, we should compare to label-based lookup given we expect labels in otel. |
Discussed at the 4/10/24 TC meeting:
This are good recommendations but they should be opened at 3 separate issues to be considered independently. @cijothomas I'm going to go ahead and close this - can you open separate issues for these? |
@jsuereth Just in case you are curious, I have more benchmarks available here: open-telemetry/opentelemetry-dotnet#5545 There are perf hits with or without an active trace. With an active trace the hits are bigger. |
This talks about Exemplar defaults overall, this is a related, but different issue, related to Exemplars.
Based on stress tests/benchmarks in OTel .NET, turning on exemplars drops perf by 10-30% (For Histograms, the drop is less, but Counters/other-sync-instruments suffer the worst perf drop). As per the current wording, the default Reservoir to be used for every non Histograms is the
SimpleFixedSizeExemplarReservoir
.Consider the following scenario:
ExemplarFilter
per instrument, asExemplarFilter
is applied at provider levelExemplarReservoir
per instrument, however, there is no "no-op"ExemplarReservoir
in the spec. This forces users to write one themselves, and then selectively apply that to instruments.Some thoughts on fixing this:
The text was updated successfully, but these errors were encountered: