-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
use SlidingTimeWindowArrayReservoir instead of default ExponentiallyDecayingReservoir in dropwizard metrics #11695
Conversation
…ecayingReservoir in dropwizard metrics
Codecov Report
@@ Coverage Diff @@
## master #11695 +/- ##
============================================
- Coverage 63.08% 63.04% -0.04%
+ Complexity 1121 1120 -1
============================================
Files 2343 2343
Lines 125676 125680 +4
Branches 19314 19314
============================================
- Hits 79285 79239 -46
- Misses 40739 40787 +48
- Partials 5652 5654 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 16 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Thanks for raising this and providing the readings! Curious how you decide to configure the sliding window to be 15 minutes? What is the side effect of that? |
I've just decided to use 15 mins because our histograms and timers provide several windowed rate values like oneMinuteRate, fiveMinuteRate and fifteenMinuteRate, being the last the longer one. In order to actually return a correct value for that rate we need to store at least the results during the last 15 mins. The side effect is the memory the metric requires.
Which means that
This is one of the problems HdrHistogram doesn't have this problem. Instead in HdrHistogram you define the min and max expected values (which may be also problematic in our case) and the precision you want to have. From HdrHistogram documentation:
What do you think? Should we decrease the |
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.
Thanks for the detailed explanation! I'm good with this as a starting point since we don't have that many metrics. We may revisit this in the future, or make it configurable.
As we know, Pinot uses Yammer as default metric exported, which has several issues.
The main issue, explained in #9416, is that Yammer histograms (including Timers) can only use the default exponential decaying reservoir, which returns incorrect results when sample data doesn't have a normal distribution. See the following post to understand the issue:
As explained in the these two blogposts, dropwizard has provides the ability to change the reservoir and there are two well known alternatives:
I have experience using the later and it works very well. But what I've done in this PR is to modify
pinot-dropwizard
to use SlidingTimeWindowArrayReservoir by default. I've discarded the other two options for the following reasons: