Closed Bug 1505500 Opened 6 years ago Closed 4 years ago

SPDY_REQUEST_PER_CONN data is misleading

Categories

(Core :: Networking: HTTP, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla78
Tracking Status
firefox78 --- fixed

People

(Reporter: u408661, Assigned: komalbharadiya, NeedInfo)

Details

(Keywords: good-first-bug, Whiteboard: [necko-triaged])

Attachments

(2 files)

Noticed when I was looking at some telemetry for bug 1504337. Right now, we calculate the value for SPDY_REQUEST_PER_CONN based on the max stream ID we hit. Problem is, we use up 6 different stream IDs for our priority tree, and those IDs don't represent any request, though they do get counted as requests for our telemetry. There's a secondary problem that we actually count our "next" ID as a request, when it's not a request - it's just waiting to become one. So, in reality, every number we report (with potentially a few exceptions if someone has turned off the http/2 priority tree) is 7 higher than it actually is.

Here's what we should do:

1. Create a new telemetry probe, SPDY_REQUEST_PER_CONN_2, to replace the existing one. It can be exactly the same in all other ways.
2. Instead of calculating the number of requests based on mNextStreamID like we do now (see https://searchfox.org/mozilla-central/rev/b096dcf0ea226af628fe03f7e7acb56a25853533/netwerk/protocol/http/Http2Session.cpp#184), we should instead add a new counter that starts at 0, and is only incremented every time we successfully activate a stream (https://searchfox.org/mozilla-central/rev/b096dcf0ea226af628fe03f7e7acb56a25853533/netwerk/protocol/http/Http2Session.cpp#728)
3. In the same spot where we currently accumulate based on mNextStreamID, instead just accumulate based on the new counter, instead.
Hi u408661, I am Komal from Pune, India. I am novice to open source. But really interested to learn and contribute for this organization. Can I work on this issue? I need help, as to how do I go about it?
Thank you!
(In reply to komalbharadiya from comment #1)
> Hi u408661, I am Komal from Pune, India. I am novice to open source. But
> really interested to learn and contribute for this organization. Can I work
> on this issue? I need help, as to how do I go about it?
> Thank you!

You can take this issue.
Hey Dragana, I was through the above links. But couldn't figure out what exactly is to be done. Can you he(In reply to Dragana Damjanovic [:dragana] from comment #2)
> (In reply to komalbharadiya from comment #1)
> > Hi u408661, I am Komal from Pune, India. I am novice to open source. But
> > really interested to learn and contribute for this organization. Can I work
> > on this issue? I need help, as to how do I go about it?
> > Thank you!
> 
> You can take this issue.

Hey Dragana, I went through the above links. But couldn't figure out what exactly is to be done. Can you help me please?
(In reply to komalbharadiya from comment #3)
> Hey Dragana, I was through the above links. But couldn't figure out what
> exactly is to be done. Can you he(In reply to Dragana Damjanovic [:dragana]
> from comment #2)
> > (In reply to komalbharadiya from comment #1)
> > > Hi u408661, I am Komal from Pune, India. I am novice to open source. But
> > > really interested to learn and contribute for this organization. Can I work
> > > on this issue? I need help, as to how do I go about it?
> > > Thank you!
> > 
> > You can take this issue.
> 
> Hey Dragana, I went through the above links. But couldn't figure out what
> exactly is to be done. Can you help me please?

1) you need to change the name on SPDY_REQUEST_PER_CONN into SPDY_REQUEST_PER_CONN_2. This is define in:
https://searchfox.org/mozilla-central/source/toolkit/components/telemetry/Histograms.json#2403

2)Add a counter that is increased in at the end of Http2Session::TryToActivate function.

3) Change the line Telemetry::Accumulate(Telemetry::SPDY_REQUEST_PER_CONN, (mNextStreamID - 1) / 2);
to use the new counter instead of (mNextStreamID - 1) / 2.
(In reply to Dragana Damjanovic [:dragana] from comment #4)
> (In reply to komalbharadiya from comment #3)
> > Hey Dragana, I was through the above links. But couldn't figure out what
> > exactly is to be done. Can you he(In reply to Dragana Damjanovic [:dragana]
> > from comment #2)
> > > (In reply to komalbharadiya from comment #1)
> > > > Hi u408661, I am Komal from Pune, India. I am novice to open source. But
> > > > really interested to learn and contribute for this organization. Can I work
> > > > on this issue? I need help, as to how do I go about it?
> > > > Thank you!
> > > 
> > > You can take this issue.
> > 
> > Hey Dragana, I went through the above links. But couldn't figure out what
> > exactly is to be done. Can you help me please?
> 
> 1) you need to change the name on SPDY_REQUEST_PER_CONN into
> SPDY_REQUEST_PER_CONN_2. This is define in:
> https://searchfox.org/mozilla-central/source/toolkit/components/telemetry/
> Histograms.json#2403
> 
> 2)Add a counter that is increased in at the end of
> Http2Session::TryToActivate function.
> 
> 3) Change the line Telemetry::Accumulate(Telemetry::SPDY_REQUEST_PER_CONN,
> (mNextStreamID - 1) / 2);
> to use the new counter instead of (mNextStreamID - 1) / 2.

Thanks alot!
Hi Dragana, Thank you for guiding. I have made changes,though not sure whether they are valid. Please check it. I am confused with patch submission as well.
Flags: needinfo?(dd.mozilla)

There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:komalbharadiya, could you have a look please?

Flags: needinfo?(komalbharadiya)

Sorry, which patch and what can I do about it?

Assignee: nobody → komalbharadiya
Status: NEW → ASSIGNED
Flags: needinfo?(dd.mozilla)
Pushed by ddamjanovic@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9c312a1ab6c5
Declared a static variable 'cntActivate' as a counter in Http2Session class. The counter is incremented in TryToActivate function. r=dragana,necko-reviewers.
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla78
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: