diff options
author | rch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-24 04:43:38 +0000 |
---|---|---|
committer | rch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-24 04:43:38 +0000 |
commit | cad532e6b8585052caf8b5d157d5227ca92ab11c (patch) | |
tree | 15bd81e168f6649ab48cf6e6eb7b453a90fa7d5a /net | |
parent | 66178a9777be0c109f59e268f9d10ed288f7fe40 (diff) | |
download | chromium_src-cad532e6b8585052caf8b5d157d5227ca92ab11c.zip chromium_src-cad532e6b8585052caf8b5d157d5227ca92ab11c.tar.gz chromium_src-cad532e6b8585052caf8b5d157d5227ca92ab11c.tar.bz2 |
Increase the QUIC UDP socket buffer to 256 packets to match the TCP receive window size.
Review URL: https://codereview.chromium.org/38233005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@230643 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/quic/congestion_control/tcp_receiver.cc | 3 | ||||
-rw-r--r-- | net/quic/congestion_control/tcp_receiver.h | 3 | ||||
-rw-r--r-- | net/quic/quic_stream_factory.cc | 5 |
3 files changed, 8 insertions, 3 deletions
diff --git a/net/quic/congestion_control/tcp_receiver.cc b/net/quic/congestion_control/tcp_receiver.cc index 465e40f..ecff130 100644 --- a/net/quic/congestion_control/tcp_receiver.cc +++ b/net/quic/congestion_control/tcp_receiver.cc @@ -7,8 +7,9 @@ namespace net { +// static // Originally 64K bytes for TCP, setting it to 256K to support higher bitrates. -const QuicByteCount kReceiveWindowTCP = 256000; +const QuicByteCount TcpReceiver::kReceiveWindowTCP = 256000; TcpReceiver::TcpReceiver() : accumulated_number_of_recoverd_lost_packets_(0), diff --git a/net/quic/congestion_control/tcp_receiver.h b/net/quic/congestion_control/tcp_receiver.h index 695ffbb..99cf93c 100644 --- a/net/quic/congestion_control/tcp_receiver.h +++ b/net/quic/congestion_control/tcp_receiver.h @@ -20,6 +20,9 @@ class NET_EXPORT_PRIVATE TcpReceiver : public ReceiveAlgorithmInterface { public: TcpReceiver(); + // Size of the (currently fixed) receive window. + static const QuicByteCount kReceiveWindowTCP; + // Start implementation of SendAlgorithmInterface. virtual bool GenerateCongestionFeedback( QuicCongestionFeedbackFrame* feedback) OVERRIDE; diff --git a/net/quic/quic_stream_factory.cc b/net/quic/quic_stream_factory.cc index 01617e7..c0c7723 100644 --- a/net/quic/quic_stream_factory.cc +++ b/net/quic/quic_stream_factory.cc @@ -18,6 +18,7 @@ #include "net/dns/host_resolver.h" #include "net/dns/single_request_host_resolver.h" #include "net/http/http_server_properties.h" +#include "net/quic/congestion_control/tcp_receiver.h" #include "net/quic/crypto/proof_verifier_chromium.h" #include "net/quic/crypto/quic_random.h" #include "net/quic/quic_client_session.h" @@ -429,10 +430,10 @@ QuicClientSession* QuicStreamFactory::CreateSession( socket->Connect(addr); // We should adaptively set this buffer size, but for now, we'll use a size - // that is more than large enough for a 100 packet congestion window, and yet + // that is more than large enough for a full receive window, and yet // does not consume "too much" memory. If we see bursty packet loss, we may // revisit this setting and test for its impact. - const int32 kSocketBufferSize(kMaxPacketSize * 100); // Support 100 packets. + const int32 kSocketBufferSize(TcpReceiver::kReceiveWindowTCP); socket->SetReceiveBufferSize(kSocketBufferSize); // Set a buffer large enough to contain the initial CWND's worth of packet // to work around the problem with CHLO packets being sent out with the |