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
Rewrite of RTT estimation section #2592
Conversation
rewrite of RTT estimation section
draft-ietf-quic-recovery.md
Outdated
endpoint: | ||
|
||
- SHOULD use the lesser of the value reported in Ack Delay field of the ACK | ||
frame and the peer's max_ack_delay transport parameter ({{ack-delay}}). |
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.
Why SHOULD? Why use 2119 language here at all?
When correcting an RTT sample, endpoints first limit the reported Ack Delay to the value of the max_ack_delay transport parameter. The RTT sample is then reduced by the resulting delay value. If correcting for host delays would result in a sample that is less than min_rtt, the unmodified sample is used. This guards against underestimation of RTT as a result of inflated reporting of host delays.
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.
Fair point. Ultimately, this is bounded by another value that the peer advertises (max_ack_delay), so there's no additional safety issue here.
draft-ietf-quic-recovery.md
Outdated
On the first RTT sample in a connection, the smoothed_rtt is set to the | ||
latest_rtt. The peer-reported host delay MUST NOT be used on the first sample, | ||
since correcting for it would result in a smoothed_rtt that is smaller than the | ||
min_rtt. |
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 assertion isn't necessary. Yes, the one sample you have for min_rtt is equal to latest_rtt, so of course any host delay will not be applied. So this just duplicates the earlier requirement. If anything, just note that there is no point in applying host delay corrections as they are never applied.
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.
I think the way the text flows now makes this statement moot. I'm removing it.
Co-Authored-By: janaiyengar <jri.ietf@gmail.com>
Co-Authored-By: janaiyengar <jri.ietf@gmail.com>
Co-Authored-By: janaiyengar <jri.ietf@gmail.com>
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.
Thanks for your comments, @martinthomson
draft-ietf-quic-recovery.md
Outdated
An endpoint uses only locally observed times in generating RTT samples and does | ||
not correct for any host delays reported by the peer ({{ack-delay}}). | ||
|
||
An RTT sample MUST NOT be generated for a packet that is not newly acknowledged. |
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.
Samples are generated using both the packet and the ack, so I have used "for packet" a couple of times. I like your phrasing better though, so using it.
draft-ietf-quic-recovery.md
Outdated
endpoint: | ||
|
||
- SHOULD use the lesser of the value reported in Ack Delay field of the ACK | ||
frame and the peer's max_ack_delay transport parameter ({{ack-delay}}). |
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.
Fair point. Ultimately, this is bounded by another value that the peer advertises (max_ack_delay), so there's no additional safety issue here.
draft-ietf-quic-recovery.md
Outdated
On the first RTT sample in a connection, the smoothed_rtt is set to the | ||
latest_rtt. The peer-reported host delay MUST NOT be used on the first sample, | ||
since correcting for it would result in a smoothed_rtt that is smaller than the | ||
min_rtt. |
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.
I think the way the text flows now makes this statement moot. I'm removing it.
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 is a big improvement over what we had. Nice work.
draft-ietf-quic-recovery.md
Outdated
|
||
An endpoint MUST NOT excessively delay acknowledgements of ack-eliciting | ||
packets. Specifically, an endpoint is expected to enforce a maximum delay to | ||
packets. Specifically, an endpoint is expected to enforce a maximum delay to | ||
avoid causing spurious timeouts at the peer. The maximum ack delay is |
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.
The text doesn't say what delay is being "enforced". Maybe:
[...] an endpoint is expected to send acknowledgments within its advertised delay to avoid causing spurious timeouts at its peer.
But maybe you can remove this sentence now that the "contract" text is here.
draft-ietf-quic-recovery.md
Outdated
latest_rtt = latest_rtt - ack_delay | ||
smoothed_rtt = 7/8 * smoothed_rtt + 1/8 * latest_rtt | ||
rttvar_sample = abs(smoothed_rtt - latest_rtt) | ||
corrected_rtt = latest_rtt - ack_delay |
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.
Maybe adjusted_rtt
instead. "Corrected" implies that there is some notion of "correctness" that applies.
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.
Thanks for the substantial rework, some comments.
draft-ietf-quic-recovery.md
Outdated
~~~ | ||
latest_rtt = ack_time - send_time_of_largest_acked | ||
~~~ | ||
|
||
First RTT sample: | ||
An endpoint uses only locally observed times in generating RTT samples and does |
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.
I'm confused about where this is going, since we're going to adjust later on?
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 subsection is talking about generating RTT samples, which do not adjust for host delays.
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.
I would just remove this paragraph, because it's potentially confusing and I'm not sure what it's adding?
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.
Fair, it's not necessary yet, so removed.
draft-ietf-quic-recovery.md
Outdated
not adjust for any host delays reported by the peer ({{host-delay}}). | ||
|
||
A peer reports host delays for only the largest acknowledged packet in an ACK | ||
frame, which is assumed by subsequent computations of smoothed_rtt and rttvar in |
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.
I'm unclear what the latter half of this sentence means? Maybe remove it?
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.
Same as above -- this section on generating RTT samples doesn't use host delay, but later subsections (srtt, rttvar) do.
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.
Bump, I'm still unclear on what the latter half of the sentence is trying to communicate.
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.
I've rewritten the para, so hopefully it reads better.
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.
Thanks, Ian -- updated.
draft-ietf-quic-recovery.md
Outdated
to adjust for any host delays - importantly, for delayed acknowledgements - when | ||
estimating the path RTT. In certain deployments, a packet might be held in the | ||
OS kernel or elsewhere on the host before being processed by the QUIC | ||
stack. Where possible, an endpoint SHOULD include these delays when populating |
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.
Yeah, this is going to need some more work anyway (#2596), but I've changed it to a MAY. What complexities does it create?
draft-ietf-quic-recovery.md
Outdated
~~~ | ||
latest_rtt = ack_time - send_time_of_largest_acked | ||
~~~ | ||
|
||
First RTT sample: | ||
An endpoint uses only locally observed times in generating RTT samples and does |
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 subsection is talking about generating RTT samples, which do not adjust for host delays.
draft-ietf-quic-recovery.md
Outdated
not adjust for any host delays reported by the peer ({{host-delay}}). | ||
|
||
A peer reports host delays for only the largest acknowledged packet in an ACK | ||
frame, which is assumed by subsequent computations of smoothed_rtt and rttvar in |
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.
Same as above -- this section on generating RTT samples doesn't use host delay, but later subsections (srtt, rttvar) do.
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.
Thanks, Ian, responses below.
draft-ietf-quic-recovery.md
Outdated
~~~ | ||
latest_rtt = ack_time - send_time_of_largest_acked | ||
~~~ | ||
|
||
First RTT sample: | ||
An endpoint uses only locally observed times in generating RTT samples and does |
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.
Fair, it's not necessary yet, so removed.
draft-ietf-quic-recovery.md
Outdated
not adjust for any host delays reported by the peer ({{host-delay}}). | ||
|
||
A peer reports host delays for only the largest acknowledged packet in an ACK | ||
frame, which is assumed by subsequent computations of smoothed_rtt and rttvar in |
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.
I've rewritten the para, so hopefully it reads better.
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.
Two small suggestions, but looks good otherwise.
Co-Authored-By: janaiyengar <jri.ietf@gmail.com>
Co-Authored-By: janaiyengar <jri.ietf@gmail.com>
Thanks, @ianswett -- I've taken in your suggestions. Merging. |
I started with trying to introduce rationale for why only ack-eliciting packets are used for RTT computation, and ended up restructuring the section.
Closes #2567, #2568.