Closed Bug 909865 Opened 12 years ago Closed 2 years ago

Add telemetry for usage of speculative HTTP connections

Categories

(Core :: Networking, defect, P5)

defect

Tracking

()

RESOLVED FIXED
113 Branch
Tracking Status
firefox113 --- fixed

People

(Reporter: ggp, Assigned: acreskey)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [necko-would-take])

Attachments

(3 files)

This will be useful for measuring the effectiveness of the Seer (bug 881804).
Comment on attachment 796156 [details] [diff] [review] Add telemetry for speculative HTTP connection use. Review of attachment 796156 [details] [diff] [review]: ----------------------------------------------------------------- So I'm not 100% sure (hence the needinfo? to mcmanus), but I think we could actually end up double-counting some nsHalfOpenSockets with this patch, in the (likely rare) case when we try to use a half-open socket that ends up being abandoned for some reason. Assuming I'm right, I think a better approach would be to add mWasSpeculative to nsHalfOpenSocket, and do all the telemtry accumulation in the dtor, based on the values of mWasSpeculative and mSpeculative.
Attachment #796156 - Flags: review?(hurley)
Patrick - see comment #2 for my question.
Flags: needinfo?(mcmanus)
Comment on attachment 796156 [details] [diff] [review] Add telemetry for speculative HTTP connection use. Review of attachment 796156 [details] [diff] [review]: ----------------------------------------------------------------- I don't think this patch is measuring what you think its measuring :) It is measuring the fraction of connection objects that were opened speculatively that were then paired with a transaction before the handshake completed. I suspect you want to measure the fraction of connection objects that were opened speculatively that are paired with at least one transaction before being closed. Specifically, once a connection is established the half open gets dtorred but the underlying socket(s) not necessarily so - they can end up in the idle connection pool waiting for a request. And with the seer that's a perfectly reasonable series of events. (right now there is a 5 second timeout on them.. nick I would think we might want to make that higher given the seer patterns) search for "small non-zero idle timeout" to find the code where that happens. so the http conn is going to have to inherit any "was speculative" flag at that point (for both the case where it goes idle and the case where it is matched up immediately).. and the telemetry can be done when the connection is reclaimed-and-not-reusable(do it there rather than the dtor so you don't have threading issues)
Flags: needinfo?(mcmanus)
Whiteboard: [necko-would-take]
Priority: -- → P5
Severity: normal → S3
Blocks: necko-perf
See Also: → 1816539
Blocks: 1816678

Until general speculative connections are fixed (bug 1816678) we will be limited in what we are gathering.

We have httpconnmgr_unused_speculative_conn, "How many speculative connections are made needlessly", which is uniformly reporting the value 1

Also some network predictor speculative probes:
PREDICTOR_TOTAL_PRECONNECTS - 0
PREDICTOR_TOTAL_PRECONNECTS_CREATED - 1.15
PREDICTOR_TOTAL_PRECONNECTS_UNUSED - 1.15
PREDICTOR_TOTAL_PRECONNECTS_USED - 1.15
(I don't understand the results but maybe it's because the connections are not being made.)

What we can add now is tracking of how often our current speculative-connection pool is maxed out.

We want to have a better understanding of speculative connect failures and socket limit exhaustion before the fix to Bug 1813618 lands.

Assignee: nobody → acreskey
Status: NEW → ASSIGNED

Please see attached request for data review.

Attachment #9321369 - Flags: data-review?(chutten)

Comment on attachment 9321369 [details]
spec_connect_data_review.md

DATA COLLECTION REVIEW RESPONSE:

Is there or will there be documentation that describes the schema for the ultimate data set available publicly, complete and accurate?

Yes.

Is there a control mechanism that allows the user to turn the data collection on and off?

Yes. This collection can be controlled through Firefox's Preferences.

If the request is for permanent data collection, is there someone who will monitor the data over time?

Yes, acreskey@mozilla.com and necko@mozilla.com are responsible.

Using the category system of data types on the Mozilla wiki, what collection type of data do the requested measurements fall under?

Category 1, Technical.

Is the data collection request for default-on or default-off?

Default on for all channels.

Does the instrumentation include the addition of any new identifiers?

No.

Is the data collection covered by the existing Firefox privacy notice?

Yes.

Does the data collection use a third-party collection tool?

No.


Result: datareview+

Attachment #9321369 - Flags: data-review?(chutten) → data-review+
Pushed by acreskey@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/63cc5bd9d512 Add telemetry for usage of speculative HTTP connections r=necko-reviewers,valentin

Backed out for causing build bustages in nsHttpConnectionMgr.cpp

Flags: needinfo?(acreskey)
Blocks: 1822348
No longer blocks: 1816678
Flags: needinfo?(acreskey)
Pushed by acreskey@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/191734ba52d5 Add telemetry for usage of speculative HTTP connections r=necko-reviewers,valentin
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 113 Branch

I put up a query for the speculative connect outcomes:
https://sql.telemetry.mozilla.org/queries/91069#225437
About 94% abort rate, but note that the vast majority of these are technically the 'early connect' behaviour of nsHttpChannel, not strictly 'speculative connections.'

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: