[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [torspec/main] Prop 324: Fix fencepost error in SENDME BDP calculation



commit 481bcc74de14ef62ade8ad3cd229cde6992a49c6
Author: Mike Perry <mikeperry-git@xxxxxxxxxxxxxx>
Date:   Fri Jul 30 13:45:02 2021 +0000

    Prop 324: Fix fencepost error in SENDME BDP calculation
---
 proposals/324-rtt-congestion-control.txt | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/proposals/324-rtt-congestion-control.txt b/proposals/324-rtt-congestion-control.txt
index 25118a4..f98c28a 100644
--- a/proposals/324-rtt-congestion-control.txt
+++ b/proposals/324-rtt-congestion-control.txt
@@ -332,13 +332,19 @@ timestamps.
 
 With this, the calculation becomes:
 
-   BWE = num_sendmes * cc_sendme_inc / num_sendme_timestamp_delta
+   BWE = (num_sendmes-1) * cc_sendme_inc / num_sendme_timestamp_delta
    BDP = BWE * RTT_min
 
-However, because the timestamps are microseconds, to avoid integer
+Note that because we are counting the number of cells *between* the first
+and last sendme of the congestion window, we must subtract 1 from the number
+of sendmes actually recieved. Over the time period between the first and last
+sendme of the congestion window, the other endpoint successfully read
+(num_sendmes-1) * cc_sendme_inc cells.
+
+Furthermore, because the timestamps are microseconds, to avoid integer
 truncation, we compute the BDP using multiplication first:
 
-   BDP = num_sendmes * cc_sendme_inc * RTT_min / num_sendme_timestamp_delta
+   BDP = (num_sendmes-1) * cc_sendme_inc * RTT_min / num_sendme_timestamp_delta
 
 Note that the SENDME BDP estimation will only work after two (2) SENDME acks
 have been received. Additionally, it tends not to be stable unless at least



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits