diff options
author | Mike Perry <mikeperry-git@torproject.org> | 2021-07-30 13:45:02 +0000 |
---|---|---|
committer | Mike Perry <mikeperry-git@torproject.org> | 2021-07-30 13:45:02 +0000 |
commit | 481bcc74de14ef62ade8ad3cd229cde6992a49c6 (patch) | |
tree | f9fd4c4365418b7921d1b4319627d22eef7c10fd /proposals | |
parent | 532bec055175b626a0b200aeeb24e57bbeb4e78e (diff) | |
download | torspec-481bcc74de14ef62ade8ad3cd229cde6992a49c6.tar.gz torspec-481bcc74de14ef62ade8ad3cd229cde6992a49c6.zip |
Prop 324: Fix fencepost error in SENDME BDP calculation
Diffstat (limited to 'proposals')
-rw-r--r-- | proposals/324-rtt-congestion-control.txt | 12 |
1 files 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 |