summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Perry <mikeperry-git@torproject.org>2022-01-23 18:15:12 +0000
committerMike Perry <mikeperry-git@torproject.org>2022-02-22 19:28:35 +0000
commit3a3f111b23d6d989dcae5858e2ab597a34f7910b (patch)
treebd6667be0a9c10b2679c9de981f66beb781d09c3 /src
parent1960bf09f3e3fb234678247f1f78d806bb9066ed (diff)
downloadtor-3a3f111b23d6d989dcae5858e2ab597a34f7910b.tar.gz
tor-3a3f111b23d6d989dcae5858e2ab597a34f7910b.zip
Exit slow start at the gamma threshold
This improves performance and fairness.
Diffstat (limited to 'src')
-rw-r--r--src/core/or/congestion_control_vegas.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/or/congestion_control_vegas.c b/src/core/or/congestion_control_vegas.c
index 0ebff17faf..ff825f94cc 100644
--- a/src/core/or/congestion_control_vegas.c
+++ b/src/core/or/congestion_control_vegas.c
@@ -210,8 +210,8 @@ congestion_control_vegas_process_sendme(congestion_control_t *cc,
cc->cwnd = MAX(cc->cwnd + MAX(CWND_INC_SS(cc), 2*cc->sendme_inc),
vegas_bdp_mix(cc));
} else {
- /* Congestion signal: Fall back to Vegas equilibrium (BDP) */
- cc->cwnd = vegas_bdp_mix(cc);
+ /* Congestion signal: Set cwnd to gamma threshhold */
+ cc->cwnd = vegas_bdp_mix(cc) + cc->vegas_params.gamma;
cc->in_slow_start = 0;
log_info(LD_CIRC, "CC: TOR_VEGAS exiting slow start");
}