diff options
author | jar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-20 05:41:42 +0000 |
---|---|---|
committer | jar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-20 05:41:42 +0000 |
commit | f9f4841b14a9f309ce5ee613f0d4de6afad88767 (patch) | |
tree | 390a79375cb846d9c0aba2b708532df92464ec26 /chrome/renderer | |
parent | 5fbd065bd1025374e52d3c939fa7f668b79c153a (diff) | |
download | chromium_src-f9f4841b14a9f309ce5ee613f0d4de6afad88767.zip chromium_src-f9f4841b14a9f309ce5ee613f0d4de6afad88767.tar.gz chromium_src-f9f4841b14a9f309ce5ee613f0d4de6afad88767.tar.bz2 |
2 experiments: DNS prefetch limit concurrency: TCP split a packet
Some firewalls apparently try to preclude a "syn flood to host" by limiting
the number of syn's (used to open a TCP/IP socket) that are outstanding
without having received a syn-ack. Presumably this is to prevent a user
from participating in a syn-flood attack (which traditional sends a lot
of syn packets, with false return addresses, resulting in no responses).
Apparently this firewall technology has in some cases been extended
to include UDP sessions for which there has been no response, and this
may include DNS resolutions. Since the prefetcher currently resolves
as many as 8 names simultaneously, this is remarkably close to the
reported threshold of 10 un-answered connections. This test attempts
to limit connections to 2, 4, or 6, so that we can see if this helps
users.
In TCP, the RTO remains (under windows) at a full 3 seconds until after the
first ack is received. As a result, if the first data packet sent (after
the SYN) is lost, then TCP won't resend until after 3 seconds without an ack.
As a test, we split up the first packet into two parts (the second part
containing only one byte). This is done as an A/B test, and we'll see
if we get a measurable improvement in page-load-time latency.
Finally, to get better page load stats, I adjusted the PLT histograms
so that we record a "final" time for abandoned pages when they are
closed (even if they didn't finish rendering, etc.). This should give
a much more fair PLT comparison for all network latency experiments.
BUG=3041
BUG=12754
r=mbelshe,darin
Review URL: http://codereview.chromium.org/1088002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42181 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer')
-rw-r--r-- | chrome/renderer/render_view.cc | 64 |
1 files changed, 58 insertions, 6 deletions
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc index 855db43..5c0b630 100644 --- a/chrome/renderer/render_view.cc +++ b/chrome/renderer/render_view.cc @@ -1640,7 +1640,8 @@ void RenderView::didStopLoading() { Send(new ViewHostMsg_DidStopLoading(routing_id_)); - MessageLoop::current()->PostDelayedTask(FROM_HERE, + MessageLoop::current()->PostDelayedTask( + FROM_HERE, method_factory_.NewRunnableMethod(&RenderView::CapturePageInfo, page_id_, false), kDelayForCaptureMs); @@ -2561,7 +2562,8 @@ void RenderView::didCommitProvisionalLoad(WebFrame* frame, history_list_offset_ = chrome::kMaxSessionHistoryEntries - 1; history_list_length_ = history_list_offset_ + 1; - MessageLoop::current()->PostDelayedTask(FROM_HERE, + MessageLoop::current()->PostDelayedTask( + FROM_HERE, method_factory_.NewRunnableMethod(&RenderView::CapturePageInfo, page_id_, true), kDelayForForcedCaptureMs); @@ -4146,10 +4148,18 @@ void RenderView::DumpLoadHistograms() const { NavigationState::FromDataSource(main_frame->dataSource()); Time finish = navigation_state->finish_load_time(); - // If we've already dumped or we haven't finished loading, do nothing. - if (navigation_state->load_histograms_recorded() || finish.is_null()) + // If we've already dumped, do nothing. + if (navigation_state->load_histograms_recorded()) return; + // Handle case where user hits "stop" or "back" before loading completely. + bool abandoned_page = finish.is_null(); + if (abandoned_page) { + finish = Time::Now(); + navigation_state->set_finish_load_time(finish); + } + UMA_HISTOGRAM_ENUMERATION("Renderer4.Abandoned", abandoned_page ? 1 : 0, 2); + LogNavigationState(navigation_state, main_frame->dataSource()); NavigationState::LoadType load_type = navigation_state->load_type(); @@ -4271,8 +4281,11 @@ void RenderView::DumpLoadHistograms() const { static bool use_dns_histogram(FieldTrialList::Find("DnsImpact") && !FieldTrialList::Find("DnsImpact")->group_name().empty()); if (use_dns_histogram) { - UMA_HISTOGRAM_ENUMERATION(FieldTrial::MakeName( - "Renderer4.LoadType", "DnsImpact"), + UMA_HISTOGRAM_ENUMERATION( + FieldTrial::MakeName("Renderer4.Abandoned", "DnsImpact"), + abandoned_page ? 1 : 0, 2); + UMA_HISTOGRAM_ENUMERATION( + FieldTrial::MakeName("Renderer4.LoadType", "DnsImpact"), load_type, NavigationState::kLoadTypeMax); switch (load_type) { case NavigationState::NORMAL_LOAD: @@ -4304,6 +4317,45 @@ void RenderView::DumpLoadHistograms() const { } } + static bool use_packet_split_histogram(FieldTrialList::Find("PacketSplit") && + !FieldTrialList::Find("PacketSplit")->group_name().empty()); + if (use_packet_split_histogram) { + UMA_HISTOGRAM_ENUMERATION( + FieldTrial::MakeName("Renderer4.Abandoned", "PacketSplit"), + abandoned_page ? 1 : 0, 2); + UMA_HISTOGRAM_ENUMERATION( + FieldTrial::MakeName("Renderer4.LoadType", "PacketSplit"), + load_type, NavigationState::kLoadTypeMax); + switch (load_type) { + case NavigationState::NORMAL_LOAD: + UMA_HISTOGRAM_CUSTOM_TIMES(FieldTrial::MakeName( + "Renderer4.BeginToFinish_NormalLoad", "PacketSplit"), + begin_to_finish, kBeginToFinishMin, kBeginToFinishMax, + kBeginToFinishBucketCount); + break; + case NavigationState::LINK_LOAD_NORMAL: + UMA_HISTOGRAM_CUSTOM_TIMES(FieldTrial::MakeName( + "Renderer4.BeginToFinish_LinkLoadNormal", "PacketSplit"), + begin_to_finish, kBeginToFinishMin, kBeginToFinishMax, + kBeginToFinishBucketCount); + break; + case NavigationState::LINK_LOAD_RELOAD: + UMA_HISTOGRAM_CUSTOM_TIMES(FieldTrial::MakeName( + "Renderer4.BeginToFinish_LinkLoadReload", "PacketSplit"), + begin_to_finish, kBeginToFinishMin, kBeginToFinishMax, + kBeginToFinishBucketCount); + break; + case NavigationState::LINK_LOAD_CACHE_STALE_OK: + UMA_HISTOGRAM_CUSTOM_TIMES(FieldTrial::MakeName( + "Renderer4.BeginToFinish_LinkLoadStaleOk", "PacketSplit"), + begin_to_finish, kBeginToFinishMin, kBeginToFinishMax, + kBeginToFinishBucketCount); + break; + default: + break; + } + } + static bool use_sdch_histogram(FieldTrialList::Find("GlobalSdch") && !FieldTrialList::Find("GlobalSdch")->group_name().empty()); if (use_sdch_histogram) { |