[tor-commits] [sbws/master] fix: doc: Add differences between Torflow and sbws

juga at torproject.org juga at torproject.org
Mon Jun 29 07:50:40 UTC 2020


commit f531c57c7f67d72a597e3299a9cb2ec053d58d8d
Author: juga0 <juga at riseup.net>
Date:   Wed May 20 13:44:59 2020 +0000

    fix: doc: Add differences between Torflow and sbws
    
    Closes #33871.
---
 docs/source/torflow_aggr.rst | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/docs/source/torflow_aggr.rst b/docs/source/torflow_aggr.rst
index 10b12a8..5b4b3fd 100644
--- a/docs/source/torflow_aggr.rst
+++ b/docs/source/torflow_aggr.rst
@@ -385,6 +385,42 @@ Per relay scaled bandwidth rounding
 Finally, the new scaled bandwidth is expressed in kilobytes and rounded a number
 of digits.
 
+Differences between Torflow aggregation and sbws scaling (May 2020)
+-------------------------------------------------------------------
+
+Torflow does not exclude relays because of having "few" measurements or "close"
+to each other for that relay.
+
+If there are not new measurements for a relay, Torflow uses the previous
+calculated bandwidth, instead of the new value::
+
+      # If there is a new sample, let's use it for all but guards
+      if n.measured_at > prev_votes.vote_map[n.idhex].measured_at:
+
+      [snip]
+
+      else:
+          # Reset values. Don't vote/sample this measurement round.
+          n.revert_to_vote(prev_votes.vote_map[n.idhex])
+
+The oldest measurements Toflow seems to take are from 4 weeks ago, while sbws
+oldest measurements are 5 days old::
+
+    GUARD_SAMPLE_RATE = 2*7*24*60*60 # 2wks
+
+    [snip]
+
+    MAX_AGE = 2*GUARD_SAMPLE_RATE
+
+    [snip]
+
+                # old measurements are probably
+                # better than no measurements. We may not
+                # measure hibernating routers for days.
+                # This filter is just to remove REALLY old files
+                if time.time() - timestamp > MAX_AGE:
+
+
 .. _README.spec.txt: https://gitweb.torproject.org/torflow.git/tree/NetworkScanners/BwAuthority/README.spec.txt
 .. _PID Controller: https://en.wikipedia.org/wiki/PID_controller
 .. _SQLSupport.py: https://gitweb.torproject.org/pytorctl.git/tree/SQLSupport.py#n493





More information about the tor-commits mailing list