Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Unified Diff: net/quic/congestion_control/pacing_sender.cc

Issue 393943004: Change QUIC's pacing sender to send at 1.25x the estimated bandwidth (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/congestion_control/pacing_sender.h ('k') | net/quic/congestion_control/pacing_sender_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/congestion_control/pacing_sender.cc
diff --git a/net/quic/congestion_control/pacing_sender.cc b/net/quic/congestion_control/pacing_sender.cc
index e84d1f2b01d866acaae5a59798d81f8c253467cf..f0f0e5dd092e19d4c4213585a9861055b936ddbd 100644
--- a/net/quic/congestion_control/pacing_sender.cc
+++ b/net/quic/congestion_control/pacing_sender.cc
@@ -67,9 +67,9 @@ bool PacingSender::OnPacketSent(
}
// The next packet should be sent as soon as the current packets has
// been transferred. We pace at twice the rate of the underlying
- // sender's bandwidth estimate to help ensure that pacing doesn't become
- // a bottleneck.
- const float kPacingAggression = 2;
+ // sender's bandwidth estimate during slow start and 1.25x during congestion
+ // avoidance to ensure pacing doesn't prevent us from filling the window.
+ const float kPacingAggression = sender_->InSlowStart() ? 2 : 1.25;
QuicTime::Delta delay =
BandwidthEstimate().Scale(kPacingAggression).TransferTime(bytes);
// If the last send was delayed, and the alarm took a long time to get
@@ -166,6 +166,10 @@ QuicByteCount PacingSender::GetCongestionWindow() const {
return sender_->GetCongestionWindow();
}
+bool PacingSender::InSlowStart() const {
+ return sender_->InSlowStart();
+}
+
QuicByteCount PacingSender::GetSlowStartThreshold() const {
return sender_->GetSlowStartThreshold();
}
« no previous file with comments | « net/quic/congestion_control/pacing_sender.h ('k') | net/quic/congestion_control/pacing_sender_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698