gfe-relnote: False deprecate --gfe2_reloadable_flag_quic_bbr_startup_rate_reduction. Two connection options, BBS4 and BBS5, both protected by this flag, are also deprecated. PiperOrigin-RevId: 304209090 Change-Id: I101643d1f1aea527f503c3450c6f93b91cfb7750
diff --git a/quic/core/congestion_control/bbr_sender.cc b/quic/core/congestion_control/bbr_sender.cc index 2961680..ee74d70 100644 --- a/quic/core/congestion_control/bbr_sender.cc +++ b/quic/core/congestion_control/bbr_sender.cc
@@ -122,8 +122,6 @@ recovery_window_(max_congestion_window_), slower_startup_(false), rate_based_startup_(false), - startup_rate_reduction_multiplier_(0), - startup_bytes_lost_(0), enable_ack_aggregation_during_startup_(false), expire_ack_aggregation_in_startup_(false), drain_to_target_(false), @@ -268,20 +266,6 @@ if (config.HasClientRequestedIndependentOption(kBBS1, perspective)) { rate_based_startup_ = true; } - if (GetQuicReloadableFlag(quic_bbr_startup_rate_reduction) && - config.HasClientRequestedIndependentOption(kBBS4, perspective)) { - QUIC_RELOADABLE_FLAG_COUNT_N(quic_bbr_startup_rate_reduction, 1, 2); - rate_based_startup_ = true; - // Hits 1.25x pacing multiplier when ~2/3 CWND is lost. - startup_rate_reduction_multiplier_ = 1; - } - if (GetQuicReloadableFlag(quic_bbr_startup_rate_reduction) && - config.HasClientRequestedIndependentOption(kBBS5, perspective)) { - QUIC_RELOADABLE_FLAG_COUNT_N(quic_bbr_startup_rate_reduction, 2, 2); - rate_based_startup_ = true; - // Hits 1.25x pacing multiplier when ~1/3 CWND is lost. - startup_rate_reduction_multiplier_ = 2; - } if (GetQuicReloadableFlag(quic_bbr_mitigate_overly_large_bandwidth_sample)) { if (config.HasClientRequestedIndependentOption(kBWM3, perspective)) { bytes_lost_multiplier_with_network_parameters_adjusted_ = 3; @@ -459,9 +443,6 @@ stats_->slowstart_packets_lost += lost_packets.size(); stats_->slowstart_bytes_lost += bytes_lost; } - if (startup_rate_reduction_multiplier_ != 0) { - startup_bytes_lost_ += bytes_lost; - } } excess_acked = sample.extra_acked; last_packet_send_state = sample.last_packet_send_state; @@ -851,20 +832,6 @@ return; } - // Slow the pacing rate in STARTUP by the bytes_lost / CWND. - if (startup_rate_reduction_multiplier_ != 0 && has_ever_detected_loss && - has_non_app_limited_sample_) { - pacing_rate_ = - (1 - (startup_bytes_lost_ * startup_rate_reduction_multiplier_ * 1.0f / - congestion_window_)) * - target_rate; - // Ensure the pacing rate doesn't drop below the startup growth target times - // the bandwidth estimate. - pacing_rate_ = - std::max(pacing_rate_, kStartupGrowthTarget * BandwidthEstimate()); - return; - } - // Do not decrease the pacing rate during startup. pacing_rate_ = std::max(pacing_rate_, target_rate); }
diff --git a/quic/core/congestion_control/bbr_sender.h b/quic/core/congestion_control/bbr_sender.h index 7aa4f69..eb8282a 100644 --- a/quic/core/congestion_control/bbr_sender.h +++ b/quic/core/congestion_control/bbr_sender.h
@@ -377,11 +377,6 @@ bool slower_startup_; // When true, disables packet conservation in STARTUP. bool rate_based_startup_; - // When non-zero, decreases the rate in STARTUP by the total number of bytes - // lost in STARTUP divided by CWND. - uint8_t startup_rate_reduction_multiplier_; - // Sum of bytes lost in STARTUP. - QuicByteCount startup_bytes_lost_; // When true, add the most recent ack aggregation measurement during STARTUP. bool enable_ack_aggregation_during_startup_;
diff --git a/quic/core/congestion_control/bbr_sender_test.cc b/quic/core/congestion_control/bbr_sender_test.cc index 483f98b..6f91153 100644 --- a/quic/core/congestion_control/bbr_sender_test.cc +++ b/quic/core/congestion_control/bbr_sender_test.cc
@@ -1081,108 +1081,6 @@ EXPECT_FALSE(sender_->ExportDebugState().last_sample_is_app_limited); } -// Ensures no change in congestion window in STARTUP after loss, but that the -// rate decreases. -TEST_F(BbrSenderTest, SimpleTransferStartupRateReduction) { - SetQuicReloadableFlag(quic_bbr_startup_rate_reduction, true); - CreateSmallBufferSetup(); - - SetConnectionOption(kBBS4); - - // Run until the full bandwidth is reached and check how many rounds it was. - bbr_sender_.AddBytesToTransfer(12 * 1024 * 1024); - bool used_conservation_cwnd = false; - bool simulator_result = simulator_.RunUntilOrTimeout( - [this, &used_conservation_cwnd]() { - if (!sender_->ExportDebugState().is_at_full_bandwidth && - sender_->GetCongestionWindow() < - sender_->ExportDebugState().congestion_window) { - used_conservation_cwnd = true; - } - // Exit once a loss is hit. - return bbr_sender_.connection()->GetStats().packets_lost > 0 || - sender_->ExportDebugState().is_at_full_bandwidth; - }, - QuicTime::Delta::FromSeconds(5)); - ASSERT_TRUE(simulator_result); - EXPECT_TRUE(sender_->InRecovery()); - EXPECT_FALSE(used_conservation_cwnd); - EXPECT_EQ(BbrSender::STARTUP, sender_->ExportDebugState().mode); - EXPECT_NE(0u, bbr_sender_.connection()->GetStats().packets_lost); - - // Lose each outstanding packet and the pacing rate decreases. - const QuicBandwidth original_pacing_rate = sender_->PacingRate(0); - QuicBandwidth pacing_rate = original_pacing_rate; - const QuicByteCount original_cwnd = sender_->GetCongestionWindow(); - LostPacketVector lost_packets; - lost_packets.push_back( - LostPacket(QuicPacketNumber(), kMaxOutgoingPacketSize)); - QuicPacketNumber largest_sent = - bbr_sender_.connection()->sent_packet_manager().GetLargestSentPacket(); - for (QuicPacketNumber packet_number = - bbr_sender_.connection()->sent_packet_manager().GetLeastUnacked(); - packet_number <= largest_sent; ++packet_number) { - lost_packets[0].packet_number = packet_number; - sender_->OnCongestionEvent(false, 0, clock_->Now(), {}, lost_packets); - EXPECT_EQ(original_cwnd, sender_->GetCongestionWindow()); - EXPECT_GT(original_pacing_rate, sender_->PacingRate(0)); - EXPECT_GE(pacing_rate, sender_->PacingRate(0)); - EXPECT_LE(1.25 * sender_->BandwidthEstimate(), sender_->PacingRate(0)); - pacing_rate = sender_->PacingRate(0); - } -} - -// Ensures no change in congestion window in STARTUP after loss, but that the -// rate decreases twice as fast as BBS4. -TEST_F(BbrSenderTest, SimpleTransferDoubleStartupRateReduction) { - SetQuicReloadableFlag(quic_bbr_startup_rate_reduction, true); - CreateSmallBufferSetup(); - - SetConnectionOption(kBBS5); - - // Run until the full bandwidth is reached and check how many rounds it was. - bbr_sender_.AddBytesToTransfer(12 * 1024 * 1024); - bool used_conservation_cwnd = false; - bool simulator_result = simulator_.RunUntilOrTimeout( - [this, &used_conservation_cwnd]() { - if (!sender_->ExportDebugState().is_at_full_bandwidth && - sender_->GetCongestionWindow() < - sender_->ExportDebugState().congestion_window) { - used_conservation_cwnd = true; - } - // Exit once a loss is hit. - return bbr_sender_.connection()->GetStats().packets_lost > 0 || - sender_->ExportDebugState().is_at_full_bandwidth; - }, - QuicTime::Delta::FromSeconds(5)); - ASSERT_TRUE(simulator_result); - EXPECT_TRUE(sender_->InRecovery()); - EXPECT_FALSE(used_conservation_cwnd); - EXPECT_EQ(BbrSender::STARTUP, sender_->ExportDebugState().mode); - EXPECT_NE(0u, bbr_sender_.connection()->GetStats().packets_lost); - - // Lose each outstanding packet and the pacing rate decreases. - const QuicBandwidth original_pacing_rate = sender_->PacingRate(0); - QuicBandwidth pacing_rate = original_pacing_rate; - const QuicByteCount original_cwnd = sender_->GetCongestionWindow(); - LostPacketVector lost_packets; - lost_packets.push_back( - LostPacket(QuicPacketNumber(), kMaxOutgoingPacketSize)); - QuicPacketNumber largest_sent = - bbr_sender_.connection()->sent_packet_manager().GetLargestSentPacket(); - for (QuicPacketNumber packet_number = - bbr_sender_.connection()->sent_packet_manager().GetLeastUnacked(); - packet_number <= largest_sent; ++packet_number) { - lost_packets[0].packet_number = packet_number; - sender_->OnCongestionEvent(false, 0, clock_->Now(), {}, lost_packets); - EXPECT_EQ(original_cwnd, sender_->GetCongestionWindow()); - EXPECT_GT(original_pacing_rate, sender_->PacingRate(0)); - EXPECT_GE(pacing_rate, sender_->PacingRate(0)); - EXPECT_LE(1.25 * sender_->BandwidthEstimate(), sender_->PacingRate(0)); - pacing_rate = sender_->PacingRate(0); - } -} - TEST_F(BbrSenderTest, DerivedPacingGainStartup) { CreateDefaultSetup();
diff --git a/quic/core/crypto/crypto_protocol.h b/quic/core/crypto/crypto_protocol.h index b9ddae9..8e03bb3 100644 --- a/quic/core/crypto/crypto_protocol.h +++ b/quic/core/crypto/crypto_protocol.h
@@ -88,10 +88,8 @@ // conservation in BBR STARTUP const QuicTag kBBS3 = TAG('B', 'B', 'S', '3'); // Slowstart packet // conservation in BBR STARTUP -const QuicTag kBBS4 = TAG('B', 'B', 'S', '4'); // Reduce rate in STARTUP by - // bytes_lost / CWND. -const QuicTag kBBS5 = TAG('B', 'B', 'S', '5'); // Reduce rate in STARTUP by - // 2 * bytes_lost / CWND. +const QuicTag kBBS4 = TAG('B', 'B', 'S', '4'); // DEPRECATED +const QuicTag kBBS5 = TAG('B', 'B', 'S', '5'); // DEPRECATED const QuicTag kBBRR = TAG('B', 'B', 'R', 'R'); // Rate-based recovery in BBR const QuicTag kBBR1 = TAG('B', 'B', 'R', '1'); // DEPRECATED const QuicTag kBBR2 = TAG('B', 'B', 'R', '2'); // DEPRECATED