-
Notifications
You must be signed in to change notification settings - Fork 840
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
m_iRTT and m_iRTTVar double EWMA #782
Comments
I checked in the original UDT4 code and this is effectively an addition for which I have no explanation. The ''avg_iir'' was not in UDT4, so this is an addition from a C++ programmer, which I am not :-) |
I would say the IIR filtering is performed for the second time on the sender's side, because of the generally unknown receiver implementation (version), that can send smoothened RTT values, as well as not smoothened. |
In some use cases the actual RTT value is more desired, than the smoothened one. |
This makes sense. This way the RTT on both sides could be in sync |
I think RTT was smoothened in receiver (upon ACKACK reception) since UDT4 (or earlier). But I agree that the instant RTT can be helpfull for features such as Network Adaptive Encoding. But only the for the receive it is 'instant' The receiver will know it via the following ACK, which is can be long if a missing packet blocks the ACK progression. Maybe an alternative stats feedback though keepalive when needed can help. |
@jeandube, you are right. The tricky part is that the receiver will calculate instant RTT based on the ACKACK packet from the sender. But will report this value only with the next ACK to the sender, which may happen up to 10 ms later. 🤔 |
Think this is similar to this that I requested? |
There are several points.
Regarding #665, I thought you added saving latest RTT before the IIR filtering, and exposed it in SRT statistics. If I missed this, please correct me. As Jean wrote,
And that is instant RTT on the sender side. And the one it received from the receiver is already a bit delayed. Although may still be better to receive the actual value, instead of the smoothened one, and expose it in adfition to the smoothened. |
An update on the current thread. According to the latest UDT draft and UDT implementation, at the very beginning there was no smoothing on the sender side. The RTT and RTTVar values were taken from the ACK packets. I suppose that the main reason EWMA has been introduced on the sender side is the adding of bidirectional transmission in UDT. This can be indirectly confirmed by the following UDT article:
On the SRT side, we've recently done some improvements around the RTT estimation, see PR #1957 (will be merged right after release v1.4.3). The detailed list of improvements is provided within the PR. One of them is to remove double smoothing at the sender side in case of unidirectional transmission. In this case, we now extract RTT and RTTVar values from the ACK packets. The RTT estimate (instantaneous) is calculated at the receiver side, then the EWMA is applied and smoothed RTT as well as RTTVar are sent to the receiver within ACK packets. There is no need to apply double smoothing on the sender side here plus the estimate is already "behind the time" at least by RTT/2. However, in the case of bidirectional transmission we still apply double smoothing as the most easiest way of obtaining RTT estimate. Improving this will require additional effort and research, out of scope currently. |
Calculation of m_iRTT/m_iRTTVar values from ACKACK trip times already has a moving average (line 6964 of core.cpp) :
Then they are sent back through the ACK packets, and then the sender side performs another EWMA on them (line 7023 of core.cpp):
Was it really intended? If yes, for what sake?
The text was updated successfully, but these errors were encountered: