-
Notifications
You must be signed in to change notification settings - Fork 171
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
Refactor Cubic, D-Cubic and Prague code #1794
Comments
master...hfstco:picoquic:cc-cleanup Currently working on it, because I have already did some modifications/cleanup to cubic.c while implementing HyStart++. I will give an update until the end of the week. I will take a look dcubic and prague to have a good overview of duplicate code and the similarities of the implementations. Then it is easier to discuss about changes and coverage. |
The way I look at it, I see the following commonality and differences:
|
There are many code parts that can be put into cc_common.c. But I like that each CC algorithm has its own code file/notify function. If I look into one of the CC notify functions, I want to understand what is happening.
I have implemented Slow Start in cc_common.c for every CC algorithm. They are built on each other to support SS, CSS and Prague beta-dependent growth of CWND.
So you are talking about the
I have made many changes to DCubic. Currently, in many cases, DCubic just redirects the Cubic notify function, except for the delay variations. This also applies to packet loss. I have to avoid calculating the pacing rate twice. A simple fix would be a simple return instead of a break. But I think there would be another, more beautiful solution. Is there a document which describes the behavior of DCubic?
That sounds good in general. But as described in RFC 9438, we should reduce our CWND by a factor of 0.7/coefficient Beta. Where are these different values from? With values above 0.5, we risk a second round of congestion/losses. Of course, fixed values are much easier to implement than an ECN rate-based Beta.
Yes. But my coverage results show me, that our recovery phase
"app limited" scenario as specified in RFC 9002 Section 7.8? HyStart is split in two parts according to "Taming the elephants: New TCP slow start":
|
DCubic was an experiment in which I initially replaced testing for packet losses by testing for delay variations. There were two objective: not be so sensitive to packet losses; and, avoid buffer bloat. The part about "not so sensitive" to packet losses is not justified today, since we react to loss rate rather than individual losses. We could just use the same behavior as Cubic. The part about "exit congestion avoidance on delay increase" is more interesting, and that's really what we want to keep in a first phase. If we want to productize that, we will have to solve the classic delay-based issues like preference for late comers, or delay drift. We will also need to solve the "compete with Cubic" situation -- DCubic is more polite than Cubic, so if competing it gets a much lower share of the bandwidth. But that can wait. For Reno, Prague and Cubic, app limited can be defined as "bytes in flight lower than CWIND". If that condition is true, the window should stay as is. It is more complicted with BBR, but then everything is. BBR being complicated is why I would like to add delay measurements and Prague-like ECN feedback to Cubic -- that could get us a protocol with latency effects similar to BBR, but much simpler and much easier to implement.
|
The code supports multiple congestion control algorithms, spread onto multiple binaries: cc_common.c, newreno.c, cubic.c and prague.c. The common and newreno parts are well tested, but the coverage of
cubic.c
andprague.c
is limited. Forcubic.c
, we have some duplication of code between the standard version and the delay based version,dcubic
. Code inspection also shows that the "recovery" state of cubic is not well implemented. Theprague
code is very similar to thenew reno
code, the main difference being the handling of ECN signals.These algorithms all have the same basic state machine:
hystart
, using code fromcc_common.c
,That commonality could be used to put more code components in common.
The text was updated successfully, but these errors were encountered: