Opened 16 months ago

Closed 3 months ago

#26597 closed defect (fixed)

Investigate and document additional overhead for first hop when not using guards

Reported by: irl Owned by: metrics-team
Priority: Medium Milestone:
Component: Metrics/Website Version:
Severity: Normal Keywords: acute-2019-q1-planned
Cc: karsten, acute, metrics-team Actual Points:
Parent ID: Points:
Reviewer: acute Sponsor:

Description

Initial plots in #25774 have shown that there is considerably higher circuit build latency from building the 1st hop compared to subsequent hops. This may be due to not using guards and some additional overhead that is not seen by normal clients when using guards (as it happens before the circuits are actually needed).

We should investigate this and document it as part of the page on Tor Metrics for #25774.

Child Tickets

Change History (15)

comment:1 Changed 8 months ago by irl

Cc: acute added
Owner: changed from hiro to metrics-team
Status: newassigned

Updating owner and CC

comment:2 Changed 8 months ago by irl

Keywords: acute-2019-q1-planned added

comment:3 Changed 6 months ago by acute

As per #29373, we've checked OP is always using guards as the first hop - and the circuits are built by a tor client process.

comment:4 Changed 6 months ago by karsten

Note to self: think about what to do with this ticket now.

comment:5 Changed 6 months ago by karsten

Yesterday we discussed that the difference might be that OnionPerf uses a new relay with the Guard flag for each circuit whereas vanilla tor uses a small, fixed set of relays with the Guard flag for all its circuits. So, even though OnionPerf uses guards for its first hops, performance may be different. OnionPerf first needs to establish a connection to the first hop which vanilla tor doesn't have to do. This is also unrelated to whether or not OnionPerf uses a pre-built circuit for any given measurement, because circuit build times are recorded at circuit build time regardless of its original purpose.

Sounds like we don't need to investigate this any further but that we should document this. Maybe we can find a very high-level explanation for the graph page and a somewhat more technical explanation for the reproducible metrics page.

comment:6 Changed 5 months ago by karsten

Cc: metrics-team added
Status: assignedneeds_review

Suggested text (in bold) for the graph page:

"This graph shows build times of circuits used for downloading static files of different sizes over Tor. The first hop build time is considerably higher in these measurements than subsequent hop build times or even first hop build times observed at common Tor clients. These measurements are performed using a newly selected guard for each measurement, whereas common Tor clients stay connected to a small number of guards which they use for all their circuits. The graph shows the range of measurements from first to third quartile, and highlights the median. The slowest and fastest quarter of measurements are omitted from the graph."

If there's a way to say these with fewer words, please suggest that!

We might not even need a more technical explanation for the reproducible metrics page. After all, that page is there to explain how to reproduce our data, not to explain how Tor works.

comment:7 Changed 5 months ago by irl

Reviewer: acute

comment:8 Changed 4 months ago by acute

Not much to improve on here, here's my take:

"The first hop build times are considerably higher for these measurements compared to those commonly observed in Tor clients. This is due to disabling Entry Guards in the Tor client configuration used by OnionPerf. Doing so ensures a new guard is selected for each circuit, as opposed to reusing connections to a small number of long-term entry guards, which is the standard mode of operation for clients."

comment:9 Changed 4 months ago by acute

The status can now be changed to fixed (I can't modify the ticket)

comment:12 Changed 3 months ago by irl

Status: needs_reviewneeds_revision

I don't think this text is actually correct. The first hop build time is the same as for regular Tor clients, but regular Tor clients won't see that latency because they have already got the connection to the guard set up.

comment:13 Changed 3 months ago by irl

Component: Metrics/OnionperfMetrics/Website

This turned into a website ticket.

comment:14 Changed 3 months ago by acute

Have reworded it slightly to make the distinction clearer, see update on https://github.com/torproject/metrics-web/pull/1

comment:15 Changed 3 months ago by karsten

Resolution: fixed
Status: needs_revisionclosed

Looks good to me! Merged and deployed. We can always make it better from here on, if we want to. I think it's fine as it is now. Thanks so much, acute! Closing.

Note: See TracTickets for help on using tickets.