[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r16862: {} Add a howto file for people who want to test hidden service (tor/branches/hidserv-design-changes)



Author: kloesing
Date: 2008-09-11 17:57:17 -0400 (Thu, 11 Sep 2008)
New Revision: 16862

Added:
   tor/branches/hidserv-design-changes/TESTME
Log:
Add a howto file for people who want to test hidden service performance improvements.

Added: tor/branches/hidserv-design-changes/TESTME
===================================================================
--- tor/branches/hidserv-design-changes/TESTME	                        (rev 0)
+++ tor/branches/hidserv-design-changes/TESTME	2008-09-11 21:57:17 UTC (rev 16862)
@@ -0,0 +1,175 @@
+Testing the Hidden Service Performance Improvements
+===================================================
+
+This Tor branch (tor/branches/hidserv-design-changes/) contains four
+performance improvements aiming at making hidden services available more
+quickly and accelerating client requests to them. Their designs have been
+described in http://freehaven.net/~karsten/hidserv/design-2008-08-15.pdf .
+
+These changes can be tested by setting up:
+
+- a Tor client offering a hidden service and
+- another Tor client requesting that hidden service 5 minutes after it is
+  started, so that it can stabilize.
+
+This document describes the changed behavior that can be observed in the
+logs when performing tests.
+
+
+1. Build More Introduction Circuits (server side)
+-------------------------------------------------
+
+When starting the Tor client that offers the hidden service, Tor picks five
+instead of three relays as introduction points and launches circuits to
+them (all example log statements in this document are on info level in the
+REND log domain):
+
+rend_services_introduce(): Picked router glookleCDN as an intro point for
+  tkakn43upbrso3z6.
+rend_services_introduce(): Picked router csr0x as an intro point for
+  tkakn43upbrso3z6.
+rend_services_introduce(): Picked router dpujtk as an intro point for
+  tkakn43upbrso3z6.
+rend_services_introduce(): Picked router Lifuka as an intro point for
+  tkakn43upbrso3z6.
+rend_services_introduce(): Picked router xanadu as an intro point for
+  tkakn43upbrso3z6.
+rend_service_launch_establish_intro(): Launching circuit to introduction
+  point "glookleCDN" for service tkakn43upbrso3z6
+rend_service_launch_establish_intro(): Launching circuit to introduction
+  point "csr0x" for service tkakn43upbrso3z6
+rend_service_launch_establish_intro(): Launching circuit to introduction
+  point "dpujtk" for service tkakn43upbrso3z6
+rend_service_launch_establish_intro(): Launching circuit to introduction
+  point "Lifuka" for service tkakn43upbrso3z6
+rend_service_launch_establish_intro(): Launching circuit to introduction
+  point "xanadu" for service tkakn43upbrso3z6
+
+The first three circuits that succeed are used as introduction points as
+usual, and Tor sends them an ESTABLISH_INTRODUCE cell:
+
+rend_service_intro_has_opened(): Established circuit 50720 as introduction
+  point for service tkakn43upbrso3z6
+rend_service_intro_established(): Received INTRO_ESTABLISHED cell on
+  circuit 50720 for service tkakn43upbrso3z6
+rend_service_intro_has_opened(): Established circuit 50285 as introduction
+  point for service tkakn43upbrso3z6
+rend_service_intro_established(): Received INTRO_ESTABLISHED cell on
+  circuit 50285 for service tkakn43upbrso3z6
+rend_service_intro_has_opened(): Established circuit 41830 as introduction
+  point for service tkakn43upbrso3z6
+rend_service_intro_established(): Received INTRO_ESTABLISHED cell on
+  circuit 41830 for service tkakn43upbrso3z6
+
+The fourth and fifth circuit are not used to establish introduction points,
+but are redefined as general-purpose circuits as soon as they are built:
+
+rend_service_intro_has_opened(): We have just finished an introduction
+  circuit, but we already have enough. Redefining purpose to general.
+rend_services_introduce(): Giving up on glookleCDN as intro point for
+  tkakn43upbrso3z6.
+rend_service_intro_has_opened(): We have just finished an introduction
+  circuit, but we already have enough. Redefining purpose to general.
+rend_services_introduce(): Giving up on Lifuka as intro point for
+  tkakn43upbrso3z6.
+
+
+2. Parallel Connections to Introduction Points (client side)
+------------------------------------------------------------
+
+When requesting a hidden service, clients create/extend a circuit to one of
+the hidden service's introduction points with a timeout of 60 seconds. In
+the changed version, clients don't wait for the whole timeout, but initiate
+additional circuit creations/extensions in parallel after the shorter
+timeout of 15 seconds (or 5 seconds in the test version to recognize the
+effect more easily).
+
+At first, Tor starts construction a single circuit to an introduction
+point:
+
+circuit_get_open_circ_or_launch(): Chose
+  '$AE60A701FD9BF0829A3D2DA40765CE7B95FAEAF3' as intro point for
+  'tanz2mxterxagxmt'.
+connection_ap_handshake_attach_circuit(): Intro (44019) and rend (16688)
+  circs are not both ready. Stalling conn. (0 sec old)
+connection_ap_handshake_attach_circuit(): Intro (44019) and rend (16688)
+  circs are not both ready. Stalling conn. (1 sec old)
+connection_ap_handshake_attach_circuit(): Intro (44019) and rend (16688)
+  circs are not both ready. Stalling conn. (2 sec old)
+connection_ap_handshake_attach_circuit(): Intro (44019) and rend (16688)
+  circs are not both ready. Stalling conn. (3 sec old)
+connection_ap_handshake_attach_circuit(): Intro (44019) and rend (16688)
+  circs are not both ready. Stalling conn. (4 sec old)
+rend_client_rendezvous_acked(): Got rendezvous ack. This circuit is now
+  ready for rendezvous.
+connection_ap_handshake_attach_circuit(): ready rend circ 16688 already
+  here (no intro-ack yet on intro 44019). (stream 4 sec old)
+connection_ap_handshake_attach_circuit(): Intro (44019) and rend (16688)
+  circs are not both ready. Stalling conn. (4 sec old)
+connection_ap_handshake_attach_circuit(): ready rend circ 16688 already
+  here (no intro-ack yet on intro 44019). (stream 5 sec old)
+connection_ap_handshake_attach_circuit(): Intro (44019) and rend (16688)
+  circs are not both ready. Stalling conn. (5 sec old)
+
+If this request takes longer than 5 seconds, Tor starts another attempt in
+parallel:
+
+circuit_get_best(): There is an intro circuit being created right now, but
+  it has already taken quite a while. Starting one in parallel.
+circuit_get_open_circ_or_launch(): Chose
+  '$103827708BD078EEC737137585ECCB5BCEA6424B' as intro point for
+  'tanz2mxterxagxmt'.
+connection_ap_handshake_attach_circuit(): ready rend circ 16688 already
+  here (no intro-ack yet on intro 30463). (stream 6 sec old)
+connection_ap_handshake_attach_circuit(): Intro (30463) and rend (16688)
+  circs are not both ready. Stalling conn. (6 sec old)
+connection_ap_handshake_attach_circuit(): ready rend circ 16688 already
+  here (no intro-ack yet on intro 30463). (stream 6 sec old)
+connection_ap_handshake_attach_circuit(): Intro (30463) and rend (16688)
+  circs are not both ready. Stalling conn. (6 sec old)
+connection_ap_handshake_attach_circuit(): ready rend circ 16688 already
+  here (no intro-ack yet on intro 30463). (stream 7 sec old)
+connection_ap_handshake_attach_circuit(): Intro (30463) and rend (16688)
+  circs are not both ready. Stalling conn. (7 sec old)
+connection_ap_handshake_attach_circuit(): ready rend circ 16688 already
+  here (no intro-ack yet on intro 30463). (stream 7 sec old)
+connection_ap_handshake_attach_circuit(): Intro (30463) and rend (16688)
+  circs are not both ready. Stalling conn. (7 sec old)
+
+At some time later, one of the introduction circuits will be open and the
+parallel circuits (if any) are closed:
+
+rend_client_introcirc_has_opened(): introcirc is open
+connection_ap_handshake_attach_circuit(): ready rend circ 16688 already
+  here (no intro-ack yet on intro 30463). (stream 7 sec old)
+connection_ap_handshake_attach_circuit(): found open intro circ 30463 (rend
+  16688); sending introduction. (stream 7 sec old)
+rend_client_send_introduction(): Sending an INTRODUCE1 cell
+connection_ap_handshake_attach_circuit(): Intro circ 30463 present and
+  awaiting ack (rend 16688). Stalling. (stream 8 sec old)
+connection_ap_handshake_attach_circuit(): Closing introduction circuit that
+  we built in parallel.
+
+
+3. Shorter Circuit Extension Timeout (client side)
+--------------------------------------------------
+
+The timeout to extend a circuit to an introduction point is reduced to 30
+seconds instead of 60 (or even 15 in the test version):
+
+circuit_expire_building(): Timing out intro circ that we would have left
+  running in the original protocol.
+
+
+4. Increase Count of Internal Circuits (server side)
+----------------------------------------------------
+
+Hidden services derive the number of internal circuits from the number of
+requests during the last 15 minutes. Starting with 3 pre-built internal
+circuits they add one internal circuit for every five requests per minute.
+(For testing purposes, the number of requests is set to 200 during the last
+15 minutes plus the real requests, resulting in at least 5 pre-built
+internal circuits.)
+
+rend_update_request_history(): Setting the number of pre-built internal
+circuits to 5