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:
Mike Perry 2022-07-31 15:09:35 +00:00 committed by David Goulet
parent 08c3ee8eca
commit 4444f5f4ed

View File

@ -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;