[tor-scaling] First draft of user-visible performance metrics

Roger Dingledine arma at torproject.org
Mon Mar 11 07:28:10 UTC 2019


On Mon, Feb 18, 2019 at 03:07:11PM +0200, George Kadianakis wrote:
> It might be that looking into the preemptive circuits logic might be a
> pretty effective low hanging fruit in terms of improving the Tor speed
> and feel for clients!

Let me grab onto this one and extend it: Tor abandons a circuit if
any stream that attaches to it takes 10 seconds for its reply. So in
the Tor Browser case, where we are isolating a webpage and all of its
components onto a single circuit... how many circuits does it actually
use in practice for realistic webpages?

In theory it should be just one, because you load all the components on
that one. But in practice it starts out as one, until *any* little ad
fetch is slow, in which case that stream and all the upcoming streams move
to a new circuit. For pages with a bunch of little components, some of
which are slow to load, we could be churning through dozens of circuits.

We would be building our new preemptive circuits in parallel to trying
to use the current ones to load the pages. How often do we run out of
preemptive circuits, in practice, while loading various pages?

If we're worried about the long tail of bad performance, this is a great
place to look.

It would be useful to have Tor Browser export the stream and circ and
conn controller events during a complex page load, and then to have a
script that can reconstruct what happened, how many circuits it used,
how much time it spent in the "would like to attach a stream but there
isn't an open circuit to attach it to yet" state, etc.

We could also imagine giving people this tool to run alongside their
Tor Browser in practice, and it would notify them (in the logs, no need
for a fancy GUI) whenever it goes into the bad state. This would give
us some handle on whether this situation happens a lot in practice or not.

See also

* https://bugs.torproject.org/5708 (closed because people wanted to make
further progress, but still a good question), and

* another ticket I can't find right now, which was about exactly this
topic. :/

--Roger



More information about the tor-scaling mailing list