-
-
Notifications
You must be signed in to change notification settings - Fork 396
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
Implement delayed acknowledgement #438
Comments
https://www.fastly.com/blog/measuring-quic-vs-tcp-computational-efficiency reports that the performance benefit of delayed ACKs is significant. We should pursue implementation. |
Also of potential interest is a draft extension for coordinating ACK delay configuration: https://tools.ietf.org/html/draft-iyengar-quic-delayed-ack-00 |
We should also stop attaching outstanding the complete list of unacknowledged ACKs to every single outgoing packet, as this places excess load on the peer. Instead, we should only transmit an ACK if new packets have been received and either the maximum ACK delay has elapsed OR the number of new packets received exceeds a tunable threshold (default 2-10). |
An implementation should immediately send an ACK upon receiving an out of order packet. |
New draft that replace previous ones: https://datatracker.ietf.org/doc/draft-ietf-quic-ack-frequency/ |
I'll be working on this in the coming weeks |
I have been digging into the code to figure out when ACKs are being sent. It looks like we are deviating from the spec in a few places, though. Could someone double-check my findings? (I might be mistaken, because of my unfamiliarity with the codebase.) I am also interested to hear why we are deviating from the spec, if that turns out to be the case. As an introduction: we send most ACK frames in packets that contain other frames as well, instead of sending ACK-only packets. However, the spec indicates a bunch of scenarios in which we should send ACK frames right away, which means we should put them in an ACK-only packet if there is no other data to send. They are listed below:
Note that, if we want to fix 1, we need to implement the following parts of the spec (they are only necessary once you start delaying acks):
|
Your analysis looks correct to me. Our ACK transmit logic is just fairly primitive; we conform to the behavior required by the spec, but have not invested heavily in optimizing it historically. Those improvements sound good. |
Generating Acknowledgements:
Detailed advice for cases when delaying acknowledgement is and is not appropriate follows. Due to the complexity cost, we should probably confirm the benefit of doing so with benchmarks.
A heavily-loaded Quinn receiver will already only generate one acknowledgement per batch of packets it consumes, so this may be less important for us than for a naive implementation.
The text was updated successfully, but these errors were encountered: