Combine startup_full_bw_threshold and probe_bw_probe_inflight_gain into full_bw_threshold in QUIC BBRv2.
PiperOrigin-RevId: 490241924
diff --git a/quiche/quic/core/congestion_control/bbr2_misc.cc b/quiche/quic/core/congestion_control/bbr2_misc.cc
index f85c602..d234f5b 100644
--- a/quiche/quic/core/congestion_control/bbr2_misc.cc
+++ b/quiche/quic/core/congestion_control/bbr2_misc.cc
@@ -283,15 +283,15 @@
// fast, conservation style response to loss, use the last sample.
last_bandwidth = congestion_event.sample_max_bandwidth;
}
- if (pacing_gain_ > Params().startup_full_bw_threshold) {
+ if (pacing_gain_ > Params().full_bw_threshold) {
// In STARTUP, pacing_gain_ is applied to bandwidth_lo_ in
// UpdatePacingRate, so this backs that multiplication out to allow the
// pacing rate to decrease, but not below
- // last_bandwidth * startup_full_bw_threshold.
+ // last_bandwidth * full_bw_threshold.
// TODO(ianswett): Consider altering pacing_gain_ when in STARTUP instead.
- bandwidth_lo_ = std::max(
- bandwidth_lo_,
- last_bandwidth * (Params().startup_full_bw_threshold / pacing_gain_));
+ bandwidth_lo_ =
+ std::max(bandwidth_lo_,
+ last_bandwidth * (Params().full_bw_threshold / pacing_gain_));
} else {
// Ensure bandwidth_lo isn't lower than last_bandwidth.
bandwidth_lo_ = std::max(bandwidth_lo_, last_bandwidth);
@@ -410,7 +410,7 @@
QUICHE_DCHECK(congestion_event.end_of_round_trip);
QuicBandwidth threshold =
- full_bandwidth_baseline_ * Params().startup_full_bw_threshold;
+ full_bandwidth_baseline_ * Params().full_bw_threshold;
if (MaxBandwidth() >= threshold) {
QUIC_DVLOG(3) << " CheckBandwidthGrowth at end of round. max_bandwidth:"
diff --git a/quiche/quic/core/congestion_control/bbr2_misc.h b/quiche/quic/core/congestion_control/bbr2_misc.h
index 579a7b5..e817e74 100644
--- a/quiche/quic/core/congestion_control/bbr2_misc.h
+++ b/quiche/quic/core/congestion_control/bbr2_misc.h
@@ -80,10 +80,9 @@
// TODO(wub): Maybe change to the newly derived value of 2.773 (4 * ln(2)).
float startup_pacing_gain = 2.885;
- // Full bandwidth is declared if the total bandwidth growth is less than
- // |startup_full_bw_threshold| times in the last |startup_full_bw_rounds|
- // round trips.
- float startup_full_bw_threshold = 1.25;
+ // STARTUP or PROBE_UP are exited if the total bandwidth growth is less than
+ // |full_bw_threshold| in the last |startup_full_bw_rounds| round trips.
+ float full_bw_threshold = 1.25;
QuicRoundTripCount startup_full_bw_rounds = 3;
@@ -136,9 +135,6 @@
int64_t probe_bw_full_loss_count =
GetQuicFlag(quic_bbr2_default_probe_bw_full_loss_count);
- // Multiplier to get target inflight (as multiple of BDP) for PROBE_UP phase.
- float probe_bw_probe_inflight_gain = 1.25;
-
// When attempting to grow inflight_hi in PROBE_UP, check whether we are cwnd
// limited before the current aggregation epoch, instead of before the current
// ack event.
diff --git a/quiche/quic/core/congestion_control/bbr2_probe_bw.cc b/quiche/quic/core/congestion_control/bbr2_probe_bw.cc
index 9b9ab3c..1e35b97 100644
--- a/quiche/quic/core/congestion_control/bbr2_probe_bw.cc
+++ b/quiche/quic/core/congestion_control/bbr2_probe_bw.cc
@@ -499,8 +499,8 @@
} else if (cycle_.rounds_in_phase > 0) {
if (Params().probe_up_dont_exit_if_no_queue_) {
is_queuing = congestion_event.end_of_round_trip &&
- model_->CheckPersistentQueue(
- congestion_event, Params().probe_bw_probe_inflight_gain);
+ model_->CheckPersistentQueue(congestion_event,
+ Params().full_bw_threshold);
} else {
QuicByteCount queuing_threshold_extra_bytes =
model_->QueueingThresholdExtraBytes();
@@ -508,7 +508,7 @@
queuing_threshold_extra_bytes += model_->MaxAckHeight();
}
QuicByteCount queuing_threshold =
- (Params().probe_bw_probe_inflight_gain * model_->BDP()) +
+ (Params().full_bw_threshold * model_->BDP()) +
queuing_threshold_extra_bytes;
is_queuing = congestion_event.bytes_in_flight >= queuing_threshold;
diff --git a/quiche/quic/core/congestion_control/bbr2_startup.cc b/quiche/quic/core/congestion_control/bbr2_startup.cc
index addf64b..8f9bd0e 100644
--- a/quiche/quic/core/congestion_control/bbr2_startup.cc
+++ b/quiche/quic/core/congestion_control/bbr2_startup.cc
@@ -76,11 +76,11 @@
static_cast<double>(
max_bw_at_round_beginning_.ToBitsPerSecond()));
// Even when bandwidth isn't increasing, use a gain large enough to
- // cause a startup_full_bw_threshold increase.
+ // cause a full_bw_threshold increase.
const float new_gain =
- ((bandwidth_ratio - 1) * (Params().startup_pacing_gain -
- Params().startup_full_bw_threshold)) +
- Params().startup_full_bw_threshold;
+ ((bandwidth_ratio - 1) *
+ (Params().startup_pacing_gain - Params().full_bw_threshold)) +
+ Params().full_bw_threshold;
// Allow the pacing gain to decrease.
model_->set_pacing_gain(
std::min(Params().startup_pacing_gain, new_gain));