mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-30 23:53:32 +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;
|
cc->max_rtt_usec = rtt;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cc->min_rtt_usec == 0 || rtt < cc->min_rtt_usec) {
|
if (cc->min_rtt_usec == 0 || cc->ewma_rtt_usec < cc->min_rtt_usec) {
|
||||||
cc->min_rtt_usec = rtt;
|
// 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;
|
return rtt;
|
||||||
|
Loading…
Reference in New Issue
Block a user