feat(cca): BBR - #1151
Conversation
Matthias247
left a comment
There was a problem hiding this comment.
Very cool to see BBR is integrateable and to hear it performs good! Definitely interested to see this landing.
I did a short skim on this, but comments are mostly stylistic since I don't have any background on BBR.
Since this is rather complex, I would be interested to see some tests as part of these changes. Ideally also in the form that show the benefits compared ot the other congestion controllers.
| // Compute how many bytes are expected to be delivered, assuming max | ||
| // bandwidth is correct. | ||
| let expected_bytes_acked = max_bandwidth | ||
| * (now - self.bbr_aggregation_epoch_start_time.unwrap_or(now)).as_micros() as u64 |
There was a problem hiding this comment.
you probably want now.saturating_duration_since(...) for safety reasons and conciseness
There was a problem hiding this comment.
fixed, but it doesn't look any more concise to me. can you make sure it's what you intended?
Ralith
left a comment
There was a problem hiding this comment.
Thanks, this looks pretty cool! Reviewed mostly for style and API impact for now, since I don't presently have time to dig deep into correctness, and it's not clear what the best reference would be to derive such a review from either.
208cd2c to
cdb93b8
Compare
|
@Ralith is this still in the pipeline? |
|
Yeah, sorry, just on limited bandwidth at the moment. I am looking forward to getting this in. |
ea02f43 to
0ae17c2
Compare
0ae17c2 to
e2ebcea
Compare
cd4b926 to
140e01a
Compare
140e01a to
70d4287
Compare
|
@FrankSpitulski this is ready for review, right? Mind marking it as such? |
337d70c to
92ae0e4
Compare
92ae0e4 to
dbc844a
Compare
|
@Ralith I'm not sure what to do about this audit failure after rebasing. It's complaining about a vulnerability in the chrono package, but I haven't touched the deps. |
|
@FrankSpitulski feel free to ignore that for now, it is irrelevant to this PR. |
dbc844a to
d23e4a2
Compare
Ralith
left a comment
There was a problem hiding this comment.
Thanks for your patience, and for keeping this rebased! I don't feel able to review the internal logic here in depth at present, but I'm happy to merge it as non-default with the experimental disclaimer. Reviewed mainly for style/clarity; I think we should be able to merge this shortly.
djc
left a comment
There was a problem hiding this comment.
Also added some style notes. Thanks for all of your work on this!
7c242a0 to
8425311
Compare
34a9ec4 to
db1a797
Compare
squashed messages: fixup for docs and removing extra braces add downcasting hatch pretty print should be Display, not Debug un-needed export fmt and clippy re-expose CCAs to public API reorder constants inline bbr_state remove extra param refactor bbr into its own module refactor bbr into its own module no threadlocal rng, use genrange rename fields for review Update quinn/src/connection.rs Co-authored-by: Benjamin Saunders <ben.e.saunders@gmail.com> Update quinn-proto/src/connection/mod.rs Co-authored-by: Benjamin Saunders <ben.e.saunders@gmail.com> Update quinn-proto/src/connection/mod.rs Co-authored-by: Benjamin Saunders <ben.e.saunders@gmail.com> fill() now supported clippy in cubic was covered by the rebase add links to BBR info refactor to hide internal PathData clarify BBR usage reduce struct scope collapse update_last_sent into on_sent collapse on_loss into on_congestion_event remove dead code Update quinn/src/connection.rs Co-authored-by: Benjamin Saunders <ben.e.saunders@gmail.com> Update quinn-proto/src/congestion/bbr.rs Co-authored-by: Benjamin Saunders <ben.e.saunders@gmail.com> Update quinn-proto/src/congestion.rs Co-authored-by: Benjamin Saunders <ben.e.saunders@gmail.com> Update quinn-proto/src/congestion/cubic.rs Co-authored-by: Benjamin Saunders <ben.e.saunders@gmail.com> clippy safer duration comparison backwards compatibility fill add docs, rename stats cca to congestion remove PacketNumber and bbr_ prefixes rename constants to rust style fix packet number typing enable drain to target bdp mode during probe bw add ack aggregation for better target growth fix not entering growth mode remove extra debug printing enable rtt probe and track min rtt track max bandwidth with minmax filter use minmax filter for max bandwidth estimation switch minmax filter to use round counts instead of times port minmax filter to rust fix: count lost packet size instead of their id fix bw estimation not updating current bw expose congestion configs split bytes acked from end ack method simplify full bandwidth check remove some unused variables add 125% of target full bandwidth condition as per docs fix loss resetting too early, fix bandwidth target units of measurement check if full bw reached calculate recovery window calculate cwnd calculate pacing rate maybe_enter_or_exit_probe_rtt update gain cycle phase refactor bandwidth estimation add cca into stats for debugging add target window add recovery state transitions loss recording bandwidth estimation
69a73f0 to
616c305
Compare
|
had to rebase @Ralith |
implements BBR congestion control based on google's quiche. There are some differences in implementation due to chromium's CCA having a different API, especially around sending vs acking packets.
It's a pretty rough first implementation but from my testing it seems to work well. It is very resistant to packet loss especially in high BDP situations.
Please critique and suggest changes as needed.
I've added additional fields and traits for debugging using stats which can be removed if needed.
Closes #693