[tor-relays] Low observed bandwith

Mario Costa mario.costa at icloud.com
Thu Apr 16 13:42:34 UTC 2020


> Il giorno 14 apr 2020, alle ore 14:48, teor <teor at riseup.net> ha scritto:
> 
> Hi,
> 
>> On 12 Apr 2020, at 10:10, Mario Costa <mario.costa at icloud.com> wrote:
>> 
>> I’m running a guard relay from my home connection on a Raspberry Pi 4. 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.
> 
> You have an asymmetric connections and Tor is a relay network. So your relay's speed will be limited by the slowest of your upload and download.
> 
> Tor also assumes your connection is full duplex. (That is, there are separate limits of 10 MB/s up and 10 MB/s down.)
> 
> You should set rate to the highest sustained bandwidth you're happy for Tor to use. Tor could use that much bandwidth for seconds or hours. That bandwidth should be lower than your connection bandwidth. (The minimum of your upload and download.)
> 
>> 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.
> 
> Where are you seeing this observed bandwidth?
> 
> Tor reports its observed bandwidth over the busiest 10 second period each day.
> 
> 60% of the rate is actually a pretty high load, because Tor is a low-latency network. (Once utilisation gets over around 10%, latency starts increasing.)
> 
> If your connection is a high latency connection, Tor may send bandwidth to lower-latency connections.
> 
> You can read a similar thread here:
> https://lists.torproject.org/pipermail/tor-relays/2020-April/018348.html <https://lists.torproject.org/pipermail/tor-relays/2020-April/018348.html>
>> The router itself easily reaches Gigabit speeds, so 10 MB/s should be a breeze. Could it be the number of connections? nyx indicates that the connections are always about 4000. If this is the case, how can I know if the connections bottleneck is the router or the Raspberry Pi?
> 
> 4000 seems pretty normal. There are only around 6000 relays.
> Check your tor, kernel, and router logs for TCP warnings?
> 
>> Additionally, I’d like to ask for a rule of thumb for setting the RelayBandwithBurst. I set it to 20 MB/s because I’m ok with the relay using the whole upload bandwidth (about 10 MB/s, or 100 Mbps) for short periods of time, but as I already explained I’m never seeing such speeds.
> 
> Setting your burst higher than your connection speed can cause latency or packet drops. Tor will allocate less bandwidth to slow or unreliable relays.
> 
> You won't see the burst in Tor's observed bandwidth. The burst is over 1-2 seconds. The rate is averaged over a few seconds. Observed is over 10 seconds.
> 
> Tor will compensate for a burst by having a few slow seconds afterwards.
> 
> Set the burst to the highest speed you ever want the relay to use over 1-2 seconds. The burst should be equal to or lower than your connection speed. (In your case, the lowest of your upload and download speed.)
> 
>> For reference my relay’s fingerprint is F942EE73F1B8E39125F617FA85E80E4C9E540A2E.
> 
> If you want Tor to use more bandwidth, try setting rate and burst to 10 Mbps.
> 
> That way, you won't be causing congestion or packet drops.
> 
> You may have to wait for a few weeks or months for your bandwidth to stabilise.
> https://blog.torproject.org/lifecycle-new-relay <https://blog.torproject.org/lifecycle-new-relay>
> 
> T
> 
> _______________________________________________
> tor-relays mailing list
> tor-relays at lists.torproject.org
> https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays


Thank you,  I mistakenly thought the the Bandwidth limits were up+down, this really clarified many things.




> Il giorno 14 apr 2020, alle ore 17:21, torjoy <south_america_bridges at protonmail.com> ha scritto:
> 
> Hi Mario,
> 
> I'm having same trouble with raspberry pi 3b... I use Wi-Fi connection with high throughput. My local connection can copy files up to 15MB/s to this RPi. It is a USB adapter (mediatek MT7601). I'm asking myself that speed on tor network shouldn't be more than 2 MB/s. I've limited the maximum in 3,2 MB/s and burst to 4,3 MB/s, my connection here in Brazil is just of 240 Mb/s // 24 Mb/s... At least 2,2 MB/s should be reached in the measurements i guess. In the past i shouldn't pass from 600 KB/s thus because my CPU consumption with TOR was near to 100%. But i've set more parallel threads in torrc and recompilled my openssl to support it the linux crypto engine, that can handle faster crypto operations. With this i've enabled hardware acceleration on torrc and reached a little bit more than 1MB/s in the measurements.
> 
> Luiz
> 
> 
> Sent with ProtonMail Secure Email.
> 
> 
> 
> _______________________________________________
> tor-relays mailing list
> tor-relays at lists.torproject.org
> https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays


As the guys explained to me you will not reach constant full load, and if your relay is fairly new it can take some time. Plus, I don’t think that wifi is the best choice for a relay. Even if your RasPi 3 doesn’t have a Gigabit adapter, a 100 Mbps ethernet connection should be more than enough for your desired Bandwidth limits.

-m


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.torproject.org/pipermail/tor-relays/attachments/20200416/fb4ddb6b/attachment-0001.html>


More information about the tor-relays mailing list