-
Notifications
You must be signed in to change notification settings - Fork 244
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
Support for cubic #415
Support for cubic #415
Conversation
This PR still seems to include unrelated code such as changes to slowstart, minmax.. can we cut it down to the bare minimum to support Cubic please? |
Hi, First, thanks for your feedback. I have normally removed all content that weren't related to cubic (as slow-start, minmax, get_dataclass_attr, ...). Only the code for cubic should remain now. Best, |
Hello, I modified the content you pinpointed above, feel free to give me additional feedback if anything is still weird or should be changed :D Have a nice day, |
OK we're getting close to a mergeable state! Would you mind rebasing on top of |
Normally this should be done, I squashed all the commits into one (4cf275a) |
Yep it's squashed but not rebased on top of |
126174c
to
bd455f2
Compare
I've been reading more of the code and I'm not entirely comfortable with how it's architectured. Could you take a look at PR #432 which only moves code around and introduces a base class for congestion control algorithms? I've had a look at whether the https://datatracker.ietf.org/doc/html/draft-ietf-quic-qlog-quic-events.html#name-recovery-events Do get in touch with @rmarx, he is usually open to suggestions on how to improve QLOG :) |
Hey both, (just for the QLOG stuff ;)) qlog is actually intended to be extensible, so implementations can log whatever extra data they care about. We indeed don't want to over-specify for the different CC algorithms, but other implementations have certainly also logged their own fields for that. The one thing you can't count on of course is that general tools (like QVIS) will do anything more with your custom fields than just show them (which is what qvis does). Looking at the specific fields here, they seem sensible. My suggestion would be to start the fields with |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #415 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 24 25 +1
Lines 4728 4840 +112
==========================================
+ Hits 4728 4840 +112 ☔ View full report in Codecov by Sentry. |
Ok, I've reverted normally every changed except for cubic, and logs, I've also run the lint checks locally (ruff + black + mypy, thank you btw because I didn't know about these tools at all) and I fixed normally everything that was listed locally |
My black version locally seem however to differ compared to the one used on CI, as it fails here, I can fix this (removing a blank line), if needed, but I'm waiting for you to confirm as I might have abused you CI instances with all these push, my apologies for this 😢 |
It looks as though you still have one linter error left :) The code is also going to need thorough tests to check everything is working in all scenarios. I would suggest you try writing a |
src/aioquic/quic/recovery.py
Outdated
"bytes_in_flight": self._cc.bytes_in_flight, | ||
"cwnd": self._cc.congestion_window, | ||
} | ||
data: Dict[str, Any] = self._cc.get_log_data() | ||
if self._cc.ssthresh is not None: |
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.
This doesn't look needed, we're already reporting ssthresh
in QuicCongestionControl.get_log_data()
Normally, I've fixed these last issues + added a test for cubic based on |
Sure! You can get coverage reports locally too: pip install coverage
coverage run -m unittest tests/test_recovery_cubic.py
coverage html
firefox htmlcov/index.html |
Wow, amazing work, thanks so much for your patience! Is the Disclaimer: I am not able to determine whether the code works as intended, or follows specs. Would you mind taking the code in its current form for a spin and checking it still behaves as you want it to? Once this is done I'd be happy to merge the code! |
Alright, thanks for the checks! Are these graphs produced from the QLOG output? I saw an article which mentioned you had set up a test bench as part of your University work? If wouldn't mind squashing your commits down to a single commit with a clean commit message I'd be happy to hit the "merge" button. |
Yup, these graphs are generated based on the QLOG files, the script can be found here if you are interested with it (it support normally any congestion control, as it only check the presence of the cwnd field in the logs), but some features (W_max, ...) might not be up to date with the latest modifications for the logs (but the core for plotting losses and cwnd does). You can also select a particular field if you want to plot other things (for example ssthresh, bytes_in_flight, ...) Normally, the commits should be squashed also ! |
Merged, thanks a lot! 🎉 I hope we will have the pleasure of seing more of your work :) |
See #402 for the details.
This PR provide support for cubic, and support for selecting the maximum datagram size.
Exemple of usage :