diff options
Diffstat (limited to 'spec/path-spec/learning-when-to-give-up-timeout-on-circuit-construction.md')
-rw-r--r-- | spec/path-spec/learning-when-to-give-up-timeout-on-circuit-construction.md | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/spec/path-spec/learning-when-to-give-up-timeout-on-circuit-construction.md b/spec/path-spec/learning-when-to-give-up-timeout-on-circuit-construction.md index 75f8641..06f6914 100644 --- a/spec/path-spec/learning-when-to-give-up-timeout-on-circuit-construction.md +++ b/spec/path-spec/learning-when-to-give-up-timeout-on-circuit-construction.md @@ -1,10 +1,12 @@ <a id="path-spec.txt-2.4"></a> + ## Learning when to give up ("timeout") on circuit construction Since version 0.2.2.8-alpha, Tor clients attempt to learn when to give up on circuits based on network conditions. <a id="path-spec.txt-2.4.1"></a> + ### Distribution choice Based on studies of build times, we found that the distribution of @@ -16,6 +18,7 @@ in the accuracy of the tail, clients approximate the tail of the multi-modal distribution with a single Pareto curve. <a id="path-spec.txt-2.4.2"></a> + ### How much data to record From our observations, the minimum number of circuit build times for a @@ -44,6 +47,7 @@ choose a different persistence mechanism than this histogram, but be aware that build time binning is still needed for parameter estimation. <a id="path-spec.txt-2.4.3"></a> + ### Parameter estimation Once 'cbtmincircs' build times are recorded, Tor clients update the @@ -53,7 +57,7 @@ too many circuits timing out). Tor clients calculate the parameters for a Pareto distribution fitting the data using the maximum likelihood estimator. For derivation, see: -https://en.wikipedia.org/wiki/Pareto_distribution#Estimation_of_parameters +<https://en.wikipedia.org/wiki/Pareto_distribution#Estimation_of_parameters> Because build times are not a true Pareto distribution, we alter how Xm is computed. In a max likelihood estimator, the mode of the distribution is @@ -117,6 +121,7 @@ but at least 60 seconds: ``` <a id="path-spec.txt-2.4.3"></a> + ### Calculating timeouts thresholds for circuits of different lengths The timeout_ms and close_ms estimates above are good only for 3-hop @@ -139,6 +144,7 @@ the client should add X to Actions(N) for every round-trip communication required with the Xth hop. <a id="path-spec.txt-2.4.4"></a> + ### How to record timeouts Pareto estimators begin to lose their accuracy if the tail is omitted. @@ -159,6 +165,7 @@ should be ignored, as this typically means one of the relays in the path is offline. <a id="path-spec.txt-2.4.5"></a> + ### Detecting Changing Network Conditions Tor clients attempt to detect both network connectivity loss and drastic @@ -179,6 +186,7 @@ recent 'cbrrecentcount') are not stored as persistent state. On reload, we start with a new, empty state. <a id="path-spec.txt-2.4.6"></a> + ### Consensus parameters governing behavior Clients that implement circuit build timeout learning should obey the @@ -290,4 +298,3 @@ the listed default values should be used instead. Effect: This is the maximum number of circuits that can be open at at the same time during the circuit build time learning phase. ``` - |