Repository navigation
feat(bbr3): add configurable loss_thresh and lower-bound gating on Bbr3Config - #5
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Adds two backward-compatible opt-in configuration knobs to
Bbr3Config(Bbr3Config::default()retains standard BBRv3LOSS_THRESH = 0.02and ungated lower-bound adaptation):Bbr3Config::loss_thresh(f64): configurable per-round-trip packet loss threshold (clamped to[0.001, 0.99]inBbr3::new), used in bothis_inflight_too_high()andinflight_at_loss().Bbr3Config::gate_lower_bounds_on_loss_thresh(bool): whentrue,adapt_lower_bounds_from_congestion()only reduces short-term lower bounds (bw_shortterm/inflight_shortterm) on loss rounds exceedingloss_thresh.Regression Tests (
noq-proto/src/congestion/bbr3/mod.rs)loss_thresh_config_prevents_high_loss_collapse: verifies over a realPair(80ms RTT, 10 MB/s, 15% s2c / 1% c2s loss, 256 KiBinitial_window) thatloss_thresh(0.30).gate_lower_bounds_on_loss_thresh(true)sustains >= 2 MB/s across back-to-back 4 MB transfers without collapsingcwndtomin_pipe_cwnd, while defaultBbr3Configpreserves standard 2% loss protection.loss_thresh_config_respects_shallow_buffer_congestion: verifies over a realPair(80ms RTT, 2 MB/s + 64 KB shallow FIFO, 0% random loss) that steady-state retransmission stays < 2% with throughput >= 1.5 MB/s.