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

Side by Side Diff: net/quic/congestion_control/tcp_cubic_sender.cc

Issue 146583006: Change the default RTT from 60ms to 100ms, which is more typical of (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/quic/congestion_control/tcp_cubic_sender.h" 5 #include "net/quic/congestion_control/tcp_cubic_sender.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 10
11 using std::max; 11 using std::max;
12 using std::min; 12 using std::min;
13 13
14 namespace net { 14 namespace net {
15 15
16 namespace { 16 namespace {
17 // Constants based on TCP defaults. 17 // Constants based on TCP defaults.
18 // The minimum cwnd based on RFC 3782 (TCP NewReno) for cwnd reductions on a 18 // The minimum cwnd based on RFC 3782 (TCP NewReno) for cwnd reductions on a
19 // fast retransmission. The cwnd after a timeout is still 1. 19 // fast retransmission. The cwnd after a timeout is still 1.
20 const QuicTcpCongestionWindow kMinimumCongestionWindow = 2; 20 const QuicTcpCongestionWindow kMinimumCongestionWindow = 2;
21 const int64 kHybridStartLowWindow = 16; 21 const int64 kHybridStartLowWindow = 16;
22 const QuicByteCount kMaxSegmentSize = kDefaultTCPMSS; 22 const QuicByteCount kMaxSegmentSize = kDefaultTCPMSS;
23 const QuicByteCount kDefaultReceiveWindow = 64000; 23 const QuicByteCount kDefaultReceiveWindow = 64000;
24 const int64 kInitialCongestionWindow = 10; 24 const int64 kInitialCongestionWindow = 10;
25 const int kMaxBurstLength = 3; 25 const int kMaxBurstLength = 3;
26 // Constants used for RTT calculation. 26 // Constants used for RTT calculation.
27 const int kInitialRttMs = 60; // At a typical RTT 60 ms. 27 const int kInitialRttMs = 100; // At a typical RTT 100 ms.
28 const float kAlpha = 0.125f; 28 const float kAlpha = 0.125f;
29 const float kOneMinusAlpha = (1 - kAlpha); 29 const float kOneMinusAlpha = (1 - kAlpha);
30 const float kBeta = 0.25f; 30 const float kBeta = 0.25f;
31 const float kOneMinusBeta = (1 - kBeta); 31 const float kOneMinusBeta = (1 - kBeta);
32 }; // namespace 32 }; // namespace
33 33
34 TcpCubicSender::TcpCubicSender( 34 TcpCubicSender::TcpCubicSender(
35 const QuicClock* clock, 35 const QuicClock* clock,
36 bool reno, 36 bool reno,
37 QuicTcpCongestionWindow max_tcp_congestion_window) 37 QuicTcpCongestionWindow max_tcp_congestion_window)
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 hybrid_slow_start_.Reset(end_sequence_number_); 369 hybrid_slow_start_.Reset(end_sequence_number_);
370 } 370 }
371 hybrid_slow_start_.Update(rtt, delay_min_); 371 hybrid_slow_start_.Update(rtt, delay_min_);
372 if (hybrid_slow_start_.Exit()) { 372 if (hybrid_slow_start_.Exit()) {
373 slowstart_threshold_ = congestion_window_; 373 slowstart_threshold_ = congestion_window_;
374 } 374 }
375 } 375 }
376 } 376 }
377 377
378 } // namespace net 378 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698