Hi everyone,<br><br>Here&#39;s a proposal for improving path selection through collecting build time statistics. We&#39;re still collecting data, so it&#39;s quite short. Comments are appreciated. <br><br>Fallon<br><br><br>
Filename: path-selection-improvements.txt<br>Title: Improving Tor Path Selection <br>Version:<br>Last-Modified: <br>Author: Fallon Chen, Mike Perry<br>Created: 5-Jul-2008<br>Status: Draft<br><br>Overview<br>&nbsp; The performance of paths selected can be improved by adjusting the<br>

&nbsp; CircuitBuildTimeout and the number of guards. This proposal describes <br>&nbsp; a method of tracking buildtime statistics, and using those statistics to adjust the<br>&nbsp; CircuitBuildTimeout and the number of guards. <br><br>

Motivation<br>&nbsp; Tor&#39;s performance can be improved by excluding those circuits that<br>&nbsp; have long buildtimes (and by extension, high latency). For those Tor users<br>&nbsp; who require better performance and have lower requirements for anonymity,<br>

&nbsp; this would be a very useful option to have. <br><br>Implementation<br><br>&nbsp; Learning the CircuitBuildTimeout<br>&nbsp;&nbsp;&nbsp; Based on studies of build times, we found that the distribution of<br>&nbsp;&nbsp;&nbsp; circuit buildtimes appears to be a Pareto distribution. The number of <br>

&nbsp;&nbsp;&nbsp; circuits to observe (ncircuits_to_observe) before changing the<br>&nbsp;&nbsp;&nbsp; CircuitBuildTimeout will be tunable. From our preliminary measurements,<br>&nbsp;&nbsp;&nbsp; it is likely that ncircuits_to_observe will be somewhere on the order of <br>

&nbsp;&nbsp;&nbsp; 1000. The values can be represented compactly in Tor in milliseconds as a&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; circular array of 16 bit integers. More compact long-term storage<br>&nbsp;&nbsp;&nbsp; representations can be implemented by simply storing a histogram with<br>

&nbsp;&nbsp;&nbsp; 50 millisecond buckets when writing out the statistics to disk.<br>&nbsp; <br>&nbsp; Calculating the preferred CircuitBuildTimeout<br>&nbsp;&nbsp;&nbsp; Circuits that have longer buildtimes than some x% of the estimated CDF of<br>&nbsp;&nbsp;&nbsp; the Pareto distribution will be excluded. x will be tunable as well. <br>

&nbsp;<br>&nbsp; Circuit timeouts<br>&nbsp;&nbsp;&nbsp; In the event of a timeout, backoff values should include the 100-x% of<br>&nbsp;&nbsp;&nbsp; expected CDF of timeouts.<br>&nbsp;&nbsp;&nbsp; Also, in the event of network failure, the observation mechanism should<br>&nbsp;&nbsp;&nbsp; stop collecting timeout data.<br>

&nbsp; <br>&nbsp; Other notes<br>&nbsp;&nbsp;&nbsp; Since this follows a Pareto distribution, large reductions on the timeout<br>&nbsp;&nbsp;&nbsp; can be achieved without cutting off a great number of the total paths.<br>&nbsp;&nbsp;&nbsp; However, hard statistics on which cutoff percentage gives optimal<br>

&nbsp;&nbsp;&nbsp; performance have not yet been gathered.<br><br>Issues<br>&nbsp; Impact on anonymity<br>&nbsp; <br><br><br><br>