mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
Use EWMA instead of bare rtt for min rtt.
This allows us to average out minimums due to lulls in activity a bit more.
This commit is contained in:
parent
08c3ee8eca
commit
4444f5f4ed
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user