Commit bf484962 authored by David Schinazi's avatar David Schinazi Committed by Commit Bot

Remove obsolete Net.SpdyHighestQueuedCappedFramesCount

Now that we have confirmed that 10000 is the correct limit here,
remove the histogram and add a comment with the relevant data.

Bug: 1053079
Change-Id: Idd767fb995295419f8b97c04960acadf445d56f3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2083993
Auto-Submit: David Schinazi <dschinazi@chromium.org>
Reviewed-by: default avatarNick Harper <nharper@chromium.org>
Reviewed-by: default avatarSteven Holte <holte@chromium.org>
Commit-Queue: Steven Holte <holte@chromium.org>
Cr-Commit-Position: refs/heads/master@{#747041}
parent edeab7b6
...@@ -87,6 +87,13 @@ const spdy::SpdyStreamId kFirstStreamId = 1; ...@@ -87,6 +87,13 @@ const spdy::SpdyStreamId kFirstStreamId = 1;
const spdy::SpdyStreamId kLastStreamId = 0x7fffffff; const spdy::SpdyStreamId kLastStreamId = 0x7fffffff;
// Maximum number of capped frames that can be queued at any time. // Maximum number of capped frames that can be queued at any time.
// We measured how many queued capped frames were ever in the
// SpdyWriteQueue at one given time between 2019-08 and 2020-02.
// The numbers showed that in 99.94% of cases it would always
// stay below 10, and that it would exceed 1000 only in
// 10^-8 of cases. Therefore we picked 10000 as a number that will
// virtually never be hit in practice, while still preventing an
// attacker from growing this queue unboundedly.
const int kSpdySessionMaxQueuedCappedFrames = 10000; const int kSpdySessionMaxQueuedCappedFrames = 10000;
class NetLog; class NetLog;
......
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
#include "base/containers/circular_deque.h" #include "base/containers/circular_deque.h"
#include "base/logging.h" #include "base/logging.h"
#include "base/metrics/histogram_macros.h"
#include "base/trace_event/memory_usage_estimator.h" #include "base/trace_event/memory_usage_estimator.h"
#include "net/spdy/spdy_buffer.h" #include "net/spdy/spdy_buffer.h"
#include "net/spdy/spdy_buffer_producer.h" #include "net/spdy/spdy_buffer_producer.h"
...@@ -53,9 +52,6 @@ SpdyWriteQueue::SpdyWriteQueue() : removing_writes_(false) {} ...@@ -53,9 +52,6 @@ SpdyWriteQueue::SpdyWriteQueue() : removing_writes_(false) {}
SpdyWriteQueue::~SpdyWriteQueue() { SpdyWriteQueue::~SpdyWriteQueue() {
DCHECK_GE(num_queued_capped_frames_, 0); DCHECK_GE(num_queued_capped_frames_, 0);
DCHECK_GT(highest_num_queued_capped_frames_, 0);
UMA_HISTOGRAM_COUNTS_100000("Net.SpdyHighestQueuedCappedFramesCount",
highest_num_queued_capped_frames_);
Clear(); Clear();
} }
...@@ -84,11 +80,6 @@ void SpdyWriteQueue::Enqueue( ...@@ -84,11 +80,6 @@ void SpdyWriteQueue::Enqueue(
if (IsSpdyFrameTypeWriteCapped(frame_type)) { if (IsSpdyFrameTypeWriteCapped(frame_type)) {
DCHECK_GE(num_queued_capped_frames_, 0); DCHECK_GE(num_queued_capped_frames_, 0);
num_queued_capped_frames_++; num_queued_capped_frames_++;
if (num_queued_capped_frames_ > highest_num_queued_capped_frames_) {
DCHECK_EQ(num_queued_capped_frames_,
highest_num_queued_capped_frames_ + 1);
highest_num_queued_capped_frames_ = num_queued_capped_frames_;
}
} }
} }
......
...@@ -110,8 +110,6 @@ class NET_EXPORT_PRIVATE SpdyWriteQueue { ...@@ -110,8 +110,6 @@ class NET_EXPORT_PRIVATE SpdyWriteQueue {
// Number of currently queued capped frames including all priorities. // Number of currently queued capped frames including all priorities.
int num_queued_capped_frames_ = 0; int num_queued_capped_frames_ = 0;
// Highest seen value of num_queued_capped_frames_.
int highest_num_queued_capped_frames_ = 1;
// The actual write queue, binned by priority. // The actual write queue, binned by priority.
base::circular_deque<PendingWrite> queue_[NUM_PRIORITIES]; base::circular_deque<PendingWrite> queue_[NUM_PRIORITIES];
......
...@@ -92818,6 +92818,9 @@ uploading your change for review. ...@@ -92818,6 +92818,9 @@ uploading your change for review.
<histogram name="Net.SpdyHighestQueuedCappedFramesCount" units="units" <histogram name="Net.SpdyHighestQueuedCappedFramesCount" units="units"
expires_after="M82"> expires_after="M82">
<obsolete>
Removed in 2020-03 once we confirmed the numbers looked as expected.
</obsolete>
<owner>dschinazi@chromium.org</owner> <owner>dschinazi@chromium.org</owner>
<summary> <summary>
The highest number of capped frames queued in the SPDY write queue. The highest number of capped frames queued in the SPDY write queue.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment