Skip to content

adaptive concurrency: Trigger minRTT calculation outside interval#10647

Merged
mattklein123 merged 5 commits intoenvoyproxy:masterfrom
tonya11en:acc_remeasure
Apr 7, 2020
Merged

adaptive concurrency: Trigger minRTT calculation outside interval#10647
mattklein123 merged 5 commits intoenvoyproxy:masterfrom
tonya11en:acc_remeasure

Conversation

@tonya11en
Copy link
Member

This patch changes the adaptive concurrency filter's minRTT measurement behavior to additionally trigger a minRTT calculation if there have been 5 consecutive concurrency limit updates at the minimum concurrency. Previous minRTT behavior is still maintained, but the new condition resets the timer on the minRTT calculation.

The minRTT convergence times should be improved for little to no observable differences in filter behavior.

Risk Level: Low
Testing: Unit tests
Docs Changes: yes
Release Notes: yes

…setting lowest concurrency

Signed-off-by: Tony Allen <tony@allen.gg>
Signed-off-by: Tony Allen <tony@allen.gg>
Signed-off-by: Tony Allen <tony@allen.gg>
@tonya11en tonya11en requested a review from mattklein123 as a code owner April 4, 2020 00:22
@mattklein123 mattklein123 self-assigned this Apr 4, 2020
@mattklein123
Copy link
Member

Can you take a look at clang-tidy errors?

/wait

Signed-off-by: Tony Allen <tony@allen.gg>
Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM with 1 small comment/question.

/wait

// inaccurate minRTT measurement. Since the limit is already where it needs to be for a minRTT
// measurement, we should measure it again.
if (consecutive_min_concurrency_set_ >= 5) {
min_rtt_calc_timer_->enableTimer(std::chrono::milliseconds(0));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't end up spin looping because if this happens while not already in a window, this will start a process that waits for requests/responses to happen, right? Can you maybe put a clarifying comment about why this won't spin loop? This is also why you need the various inMinRTTSamplingWindow checks, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think any issues around spin looping are prevented first thing in enterMinRTTSamplingWindow. Added a comment to clarify this, but let me know if I addressed the right concern.

Signed-off-by: Tony Allen <tony@allen.gg>
Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@mattklein123 mattklein123 merged commit 27455d6 into envoyproxy:master Apr 7, 2020
@tonya11en tonya11en deleted the acc_remeasure branch April 8, 2020 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants