-
Notifications
You must be signed in to change notification settings - Fork 203
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
Including ACK delay in packet loss detection time threshold #3951
Comments
I am comfortable with this discrepancy (or all three). The loss detection threshold is based on observing a gap, so it only applies when there is an obligation to acknowledge immediately if the ACK is received. Thus the max_ack_delay doesn't apply. The failed path validation timeout simply uses a value that allows for some loss and a response. Any value suffices here, but this value ensures that there is ample opportunity to get a response back. The closing and draining states follow similar logic to path validation. Any value would suffice, and in this case the goal is only to avoid silly values being set and connections timing out before you give PTO a chance to repair losses. (I just successfully simulated a handshake with a 25s RTT, 10% loss, and a 30s idle timeout. This last safeguard is relevant there. As long as you avoid an idle timeout that is less than the RTT you get a "usable" connection.) |
While in a typical case the inclusion/omission does seem insignificant, |
max_ack_delay isn't included in time threshold loss detection because the transport document says you need to acknowledge packets which were previously missing immediately and that out of order packets are acknowledged immediately. So not including it is because it's not necessary to include it, and including it would slow down loss detection, in some cases substantially. |
Is there anything to be done here? |
Some clarifying language expressing that the ack delay is included in path validation/closing/draining timers/etc only for simplicity would be nice. Given the large potential impact, the reader is otherwise left trying to guess why that's appropriate. |
Thanks, that sounds editorial. |
Let's close this one, because this title is really throwing me off. I opened #3987 for the specific suggestion. |
In quinn-rs/quinn#815, I've been going through the handling of PTO and other timer-related code in the Quinn implementation to make sure that it is consistent and compliant with the spec. One issue I bumped on is whether/when the ACK delay is relevant to a particular timer. This seemed somewhat inconsistent to me in the code, so I dug through the recovery spec and found the following:
Time Treshold for detecting packet loss says the time threshold is
max(kTimeThreshold * max(smoothed_rtt, latest_rtt), kGranularity)
, so it does not include the ACK delay. This seems surprising to me, as the ACK delay seems highly relevant in this case...Idle Timeout says "To avoid excessively small idle timeout periods, endpoints MUST increase the idle timeout period to be at least three times the current Probe Timeout (PTO)."; it seems like the ACK delay is relevant here: we wouldn't want to consider a connection idle if we haven't received ACKs because they are delayed.
Failed Path Validation says
validation_timeout = max(3*PTO, 6*kInitialRtt)
. However, path validation should be based on aPATH_RESPONSE
frame, not anACK
frame, so including themax_ack_delay
here doesn't seem relevant from first principles.Closing And Draining Connection States says "These states SHOULD persist for at least three times the current Probe Timeout (PTO) interval as defined in [QUIC-RECOVERY].", so I think this should keep the ACK delay as well.
So concrete questions I came up with:
max_ack_delay
into account somehow?max_ack_delay
?max_ack_delay
?The text was updated successfully, but these errors were encountered: