[tor-commits] [sbws/maint-1.1] fix: doc: Update differences Torflow/sbws

juga at torproject.org juga at torproject.org
Fri Feb 26 10:17:25 UTC 2021


commit f9e4549b7fa80c8d3f459b9dbc960673fca18270
Author: juga0 <juga at riseup.net>
Date:   Thu Feb 18 12:34:23 2021 +0000

    fix: doc: Update differences Torflow/sbws
    
    Closes #40056
---
 docs/source/differences.rst | 59 ++++++++++++++++++++++++++++-----------------
 1 file changed, 37 insertions(+), 22 deletions(-)

diff --git a/docs/source/differences.rst b/docs/source/differences.rst
index 6f904e5..cf5e636 100644
--- a/docs/source/differences.rst
+++ b/docs/source/differences.rst
@@ -1,36 +1,51 @@
 .. _differences:
 
-Differences between Torflow aggregation and sbws scaling (May 2020)
--------------------------------------------------------------------
+Differences between Torflow and sbws
+====================================
+
+(Last updated 2020-02-18)
+
+Aggregating measurements and scaling
+------------------------------------
+
+Filtering
+~~~~~~~~~
 
 Torflow does not exclude relays because of having "few" measurements or "close"
-to each other for that relay.
+to each other for that relay, like sbws does :ref:`filtering-measurements`.
+
+However this is currently disabled in sbws.
+
+Network stream and filtered bandwidth
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Torflow calculates the network stream and filtered averages by type of relay
+:ref:`stream-and-filtered-bandwidth-for-all-relays`, while sbws is not taking
+into account the type of relay :ref:`scaling-the-bandwidth-measurements`.
 
-If there are not new measurements for a relay, Torflow uses the previous
-calculated bandwidth, instead of the new value::
+Values from the previous Bandwidth File
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-      # 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:
+sbws is not reading the previous Bandwidth File, but scaling all the values
+with the raw measurements.
 
-      [snip]
+Instead, Torflow uses the previous Bandwidth File values in some cases:
 
-      else:
-          # Reset values. Don't vote/sample this measurement round.
-          n.revert_to_vote(prev_votes.vote_map[n.idhex])
+- When a relay measurement is older than the one in the previous
+  Bandwidth File, it uses all the values from the previous Bandwidth File.
+  (how is possible that the Bandwidth File would have a newer measurements?)::
 
-The oldest measurements Toflow seems to take are from 4 weeks ago, while sbws
-oldest measurements are 5 days old::
+    self.new_bw = prev_vote.bw * 1000
 
-    GUARD_SAMPLE_RATE = 2*7*24*60*60 # 2wks
+Bandwidth File KeyValues
+~~~~~~~~~~~~~~~~~~~~~~~~
 
-    [snip]
+sbws does not calculate nor write to the Bandwidth file the ``pid`` variables
+and KeyValues that are used in Torflow. Example of Torflow KeyValues not in sbws::
 
-    MAX_AGE = 2*GUARD_SAMPLE_RATE
+  measured_at=1613547098 updated_at=1613547098 pid_error=11.275680184 pid_error_sum=11.275680184 pid_bw=23255048 pid_delta=11.0140582849 circ_fail=0.0
 
-    [snip]
+sbws does not have ``measured_at`` and ``updated_at`` either.
 
-                # 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:
+Currently the scaled bandwidth in Torflow does not depend on those extra values
+and they seem to be just informative.



More information about the tor-commits mailing list