Opened 11 months ago

Last modified 6 months ago

#31893 new task

Measure performance of update pings and update downloads in Tor Browser

Reported by: gk Owned by: tbb-team
Priority: Medium Milestone:
Component: Applications/Tor Browser Version:
Severity: Normal Keywords: tbb-performance, TorBrowserTeam202006
Cc: karsten, irl Actual Points:
Parent ID: Points: 2
Reviewer: Sponsor:

Description

To get a better understanding of how Tor impacts speed of browsers we could start with measurements for update pings and update downloads in Tor Browser.

Apart from being a good idea in general it would help coming up with actual numbers for Mozilla's decision on how to integrate and use Tor in Firefox

Child Tickets

TicketStatusOwnerSummaryComponent
#30977newtbb-teamMake it possible to measure Tor performance while doing Tor Browser updates/update pingsApplications/Tor Browser

Change History (7)

comment:1 Changed 11 months ago by arma

Cc: karsten irl added

This is a great first item to look at for instrumenting for browser performance.

I am cc'ing Karsten and Iain here so they can follow along, since this is about performance metrics data collection and analysis.

GeKo, can you lay out some options for us, about how we might implement this idea in practice? I can imagine the two main categories of approach are "hack something up ourselves" or "reuse the firefox telemetry stuff, but safely".

comment:2 in reply to:  1 Changed 11 months ago by gk

Replying to arma:

This is a great first item to look at for instrumenting for browser performance.

I am cc'ing Karsten and Iain here so they can follow along, since this is about performance metrics data collection and analysis.

GeKo, can you lay out some options for us, about how we might implement this idea in practice? I can imagine the two main categories of approach are "hack something up ourselves" or "reuse the firefox telemetry stuff, but safely".

Yes, those two options come to mind first. I had been thinking more of the first option as the telemetry system is a large beast and we only need a fraction of its features, yet we'd need to have the whole thing in mind and to audit it to be sure we are on the safe side when collecting that info.

comment:3 Changed 9 months ago by arma

Here is a concrete simple option: Tor Browser remembers the rtt from its last update ping, and includes it in the http headers of its next update ping.

Then we'd change the apache config to write those headers down somewhere.

Even this simple plan needs some more design. For example:

  • Do we want to remember this info across restarts of Tor Browser, or only do it when the browser has been running the whole time? The simple choice is to only remember it in memory.
  • Is there anything about the previous value that could be too sensitive to (anonymously) share? My first thought would be "no, it's fine", and my backup answer if we don't like the first one would be "we could round to the nearest 10ms or something".
  • What exactly do we mean by rtt? Do we mean the time from when the browser decides it wants to check an update until the time it knows its answer? Because that conflates "time waiting for a circuit to be ready, time waiting for the connected cell, time for answering the update ping". We could break those into their components and report each one separately. Or the simpler approach, if we truly mean rtt, is to only track the response time between when Tor sends the http request, and the time it gets its answer. Even that is complicated a bit by whether and how we are doing the optimistic data trick. But it sounds totally doable.

comment:4 Changed 9 months ago by sysrqb

Keywords: TorBrowserTeam202001 added

Considering our Apache logs currently do not log headers or query strings (the latter seemed like an easier solution, initially). Maybe instead of relying on attaching these measurements along side another request, we can follow a successful ping or download with a PUT /aus1/torbrowser/6.5.2/tor-browser-win32-6.5.2_en-US.mar/$measured-value. That will be reflected directly in the log and it will associate the measurement with the filename. We won't actually put anything, but the idea is explicitly marking this as the client uploading something (instead of fetching).

Some of arma's other questions remain.

comment:5 Changed 8 months ago by pili

Points: 2

comment:6 Changed 6 months ago by pili

Keywords: TorBrowserTeam202002 added; TorBrowserTeam202001 removed

Moving tickets to February

comment:7 Changed 6 months ago by pili

Keywords: TorBrowserTeam202006 added; TorBrowserTeam202002 removed

do this post ESR migration

Note: See TracTickets for help on using tickets.