[tor-relays] Low observed bandwith

Roger Dingledine arma at torproject.org
Thu Apr 16 14:22:05 UTC 2020


[Hi Mario! I wrote this draft and then stopped half-through, and then
teor wrote a good response too. So I'm going to send it as-is, rather
than quietly delete it, in case it helps reinforce some of the points
that teor made.]

On Sat, Apr 11, 2020 at 02:55:59PM +0200, Mario Costa wrote:
> I???m running a guard relay from my home connection on a Raspberry Pi 4.

Thanks for running a relay!

> My internet connection is 1000/100 Mbps, and I thought I???d allocate half of the upload bandwidth for the relay. Then I set RelayBandwidthRate to 10 MB/s, because I thought that Tor would upload 5 MB/s and download 5 MB/s.

Actually, a rate of 10mbytes/s means it will do up to 10mbytes/s upload
and also up to 10mbytes/s download. That is, the rate setting applies to
'each way', not 'total for both'.

> However, the maximum observed bandwidth was always about 6 MB/s. I???d like to know what could cause this low observed bandwidth. I don???t think it???s the Raspberry Pi, because CPU usage is always low and it has a Gigabit connection to the router.

Answer #1: that 6mbytes/s is the most the relay has seen itself actually
handle, in any ten-second period. That is, there was some ten second
period over the past few days where the relay sent 60mbytes of actual
traffic, and also some ten second period (doesn't have to be the same one)
where it received 60mbytes of actual traffic.

So it isn't that the relay measured itself and found that it could only
do 6mbytes/s. It's that the load from actual user traffic has reached that
high, and so that's the number that it has seen itself do ("observed").

And that leads to the natural follow-up question of "Ok, but how come
the user traffic only got that high? I could handle a lot more!"

And that's a harder question to answer, because it has to do with overall
network load ("what all the Tor users together are trying to do right
now"), and with load balancing across all the relays ("how much of that
traffic gets sent toward your relay").

The simple answer is that random chance hasn't yet brought the combination
of user flows to your relay at the right time to show it that it can
do more.

But here, your 100mbit up limit looks like it could actually matter.
The reason is that you can't push more than about 12 megabytes in a
second, and that could impact whether you end up pushing more than 60
megabytes in 10 seconds. I tried to construct a concrete scenario with
numbers that add up, but I have so far failed to make a convincing one.
So maybe 100mbit is sufficiently high that there aren't realistic
scenarios where it will be a limitation. I'm not sure.

Hope this helps,
--Roger



More information about the tor-relays mailing list