[tor-bugs] #33871 [Core Tor/sbws]: Scale exactly as torflow does?
Tor Bug Tracker & Wiki
blackhole at torproject.org
Sat May 16 11:18:20 UTC 2020
#33871: Scale exactly as torflow does?
-------------------------------------------------+-------------------------
Reporter: juga | Owner: juga
Type: defect | Status:
| assigned
Priority: Medium | Milestone: sbws:
| 1.1.x-final
Component: Core Tor/sbws | Version:
Severity: Normal | Resolution:
Keywords: sbws-majority-blocker, sbws-roadmap | Actual Points:
Parent ID: #33775 | Points:
Reviewer: | Sponsor:
-------------------------------------------------+-------------------------
Comment (by juga):
Replying to [comment:15 juga]:
[snip]
> > I just dug a bit deeper into the 0 bw issue, and I found that we
actually set it to at leasty 1, to simplify computation. This is done in
the TorCtl.Router class:
https://gitweb.torproject.org/pytorctl.git/tree/TorCtl.py#n379
> >
> > So we should probably do something that in sbws too (either hack to 1
or riddle with special cases everywhere), so we can still measure 0-bw
relays.
>
> Yes, we're doing that in sbws, note that in my previous reply i included
a `1` in the `new_bw` equations, ie. `new_bw = min(consensus bandwidth,
descriptor observed bandwidth, descriptor average bandwidth, descriptor
burst bandwidth, 1) * ratio`
Oh, sorry, i wanted to put all in 1 line, but this ^ would be always `1`
:)
So it should be the maximum between any bandwidth value and 1 and then the
minimum with those.
I realized that we're actually taking the maximum of the new bandwidth and
1 at the very end, which would be also different to take the maximum of
any bandwidth value an 1 before multiplying by the ratio. We should
probably do it in this last way, as torflow does.
>
> What i mean is that it's a different thing to calculate the minimum when
one of those values is 0 (the result will be 1) or to exclude one of those
values when it's 0 (the result will be greater or equal than 1).
>
> Note that AFAIU, Torflow code is not calculating the `new_bw` using the
consensus bandwidth, though, it just does not produce any bandwidth file
if any consensus bandwidth is missing.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/33871#comment:16>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list