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

Issue 740793002: Record the last packet send time before we start sending the packet (Closed)

Created:
6 years, 1 month ago by ramant (doing other things)
Modified:
6 years, 1 month ago
Reviewers:
Ryan Hamilton
CC:
chromium-reviews, cbentzel+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@Remove_QUIC_LOG_80124025
Project:
chromium
Visibility:
Public.

Description

Record the last packet send time before we start sending the packet Problem: Every time QuicConnection sends a new packet, it records the time that the packet was sent. It passes this information to the QuicSentPacketManager, which ultimately stores the information in the TransmissionInfo.sent_time for the packet. Later, when the QuicSentPacketManager receives an ack for the packet, it retrieves its TransmissionInfo and takes a sample of the current RTT as follows: rtt_sample = ack_receive_time - transmission_info.sent_time Previously, QuicConnection was recording the packet "sent_time" as the time that WritePacket completes. The problem with this approach is that the write itself may pause the thread or take a long time. In this case, transmission_info.sent_time will be artificially inflated. When that inflated value is subtracted from the ack time, as above, it will cause the current RTT sample to become artificially small. An artificially small RTT will affect our current estimate of the min RTT, which we currently cannot recover from. The min_rtt will be pinned to the aberrant value. Solution: Changed the code to record the sent_time as the time that the write begins. The drawback of this approach is that any extra send time will be temporarily factored into our smoothed-RTT calculations. The advantage is that it will prevent artificially small RTTs from setting the min_rtt forever. Added a corresponding test, which exercises this scenario by artificially advancing the clock during the write. Change QUIC to record send timestamp prior to write. Protected by FLAGS_quic_record_send_time_before_write. Merge internal change: 80138676 R=rch@chromium.org

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+126 lines, -11 lines) Patch
M net/quic/quic_connection.h View 1 chunk +2 lines, -2 lines 0 comments Download
M net/quic/quic_connection.cc View 4 chunks +25 lines, -6 lines 0 comments Download
M net/quic/quic_connection_test.cc View 8 chunks +90 lines, -3 lines 0 comments Download
M net/quic/quic_flags.h View 1 chunk +1 line, -0 lines 0 comments Download
M net/quic/quic_flags.cc View 1 chunk +7 lines, -0 lines 2 comments Download
M net/quic/quic_session_test.cc View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
ramant (doing other things)
6 years, 1 month ago (2014-11-19 22:07:15 UTC) #1
Ryan Hamilton
lgtm https://codereview.chromium.org/740793002/diff/1/net/quic/quic_flags.cc File net/quic/quic_flags.cc (right): https://codereview.chromium.org/740793002/diff/1/net/quic/quic_flags.cc#newcode63 net/quic/quic_flags.cc:63: bool FLAGS_quic_record_send_time_before_write = false; You can confirm with ...
6 years, 1 month ago (2014-11-20 01:06:42 UTC) #2
ramant (doing other things)
On 2014/11/20 01:06:42, Ryan Hamilton wrote: > lgtm > > https://codereview.chromium.org/740793002/diff/1/net/quic/quic_flags.cc > File net/quic/quic_flags.cc (right): ...
6 years, 1 month ago (2014-11-20 01:31:14 UTC) #3
Ian Swett
On 2014/11/20 01:31:14, ramant wrote: > On 2014/11/20 01:06:42, Ryan Hamilton wrote: > > lgtm ...
6 years, 1 month ago (2014-11-20 15:32:32 UTC) #4
ramant (doing other things)
6 years, 1 month ago (2014-11-20 22:41:25 UTC) #5
Message was sent while issue was closed.
https://codereview.chromium.org/740793002/diff/1/net/quic/quic_flags.cc
File net/quic/quic_flags.cc (right):

https://codereview.chromium.org/740793002/diff/1/net/quic/quic_flags.cc#newco...
net/quic/quic_flags.cc:63: bool FLAGS_quic_record_send_time_before_write =
false;
On 2014/11/20 01:06:42, Ryan Hamilton wrote:
> You can confirm with ian, but I think it's probably fine to make this true.

Changed it in https://codereview.chromium.org/744273002
Done.

Powered by Google App Engine
This is Rietveld 408576698