-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
perf: Use RTT variance instead of a fixed threshold #3671
Conversation
Instead of using a fixed threshold, this calculates the standard deviation of the EWMA of the past RTT measurements, and uses a multiple of that as the threshold range. Signed-off-by: Bruce Guenter <bruce@timber.io>
This also adds an internal option for a custom EWMA alpha. Signed-off-by: Bruce Guenter <bruce@timber.io>
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.
🎉
I'll try this out with the tests we have so far.
let variance = self.variance.unwrap_or(0.0); | ||
( | ||
point * self.alpha + avg * (1.0 - self.alpha), | ||
Some((1.0 - self.alpha) * (variance + self.alpha * delta * delta)), |
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.
Would you be able to explain a bit what this is doing?
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.
(specifically the variance bit of the calculation)
I note that I see:
When building. I reran the tests (including the added "knee behavior" tests). Some observations:
Before (424ea5e): After (6670a0e): I'm realizing it'd probably be useful to plot before/after on the same graphs (specifically the throughput) to make it easier to see differences. I opened vectordotdev/http_test_server#4 to that end. |
Since this doesn't seem to have helped any, at least with our simulations, and needs some work to be usable, I will close this for now and see what happens in real deployment situations. |
Instead of using a fixed threshold, this calculates the standard deviation of the EWMA of the past RTT measurements, and uses a multiple of that as the threshold range.