[tor-commits] [tor] 03/09: Use EWMA instead of bare rtt for min rtt.

gitolite role git at cupani.torproject.org
Thu Aug 11 13:28:47 UTC 2022


This is an automated email from the git hooks/post-receive script.

dgoulet pushed a commit to branch main
in repository tor.

commit 4444f5f4ed968f08d26735a2531f03a6c4369226
Author: Mike Perry <mikeperry-git at torproject.org>
AuthorDate: Sun Jul 31 15:09:35 2022 +0000

    Use EWMA instead of bare rtt for min rtt.
    
    This allows us to average out minimums due to lulls in activity a bit more.
---
 src/core/or/congestion_control_common.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/core/or/congestion_control_common.c b/src/core/or/congestion_control_common.c
index c1a62cada0..b90c78729a 100644
--- a/src/core/or/congestion_control_common.c
+++ b/src/core/or/congestion_control_common.c
@@ -857,8 +857,10 @@ congestion_control_update_circuit_rtt(congestion_control_t *cc,
     cc->max_rtt_usec = rtt;
   }
 
-  if (cc->min_rtt_usec == 0 || rtt < cc->min_rtt_usec) {
-    cc->min_rtt_usec = rtt;
+  if (cc->min_rtt_usec == 0 || cc->ewma_rtt_usec < cc->min_rtt_usec) {
+    // Using the EWMA for min instead of current RTT helps average out
+    // effects from other conns
+    cc->min_rtt_usec = cc->ewma_rtt_usec;
   }
 
   return rtt;

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the tor-commits mailing list