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

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



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@xxxxxxxxxxxxxx>
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.
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits