<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class=""><div><br class=""><blockquote type="cite" class=""><div class="">Il giorno 14 apr 2020, alle ore 14:48, teor <<a href="mailto:teor@riseup.net" class="">teor@riseup.net</a>> ha scritto:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="content-type" content="text/html; charset=utf-8" class=""><div dir="auto" class=""><div dir="ltr" class=""><meta http-equiv="content-type" content="text/html; charset=utf-8" class=""><div dir="ltr" class="">Hi,</div><div dir="ltr" class=""><br class=""><blockquote type="cite" class="">On 12 Apr 2020, at 10:10, Mario Costa <<a href="mailto:mario.costa@icloud.com" class="">mario.costa@icloud.com</a>> wrote:</blockquote></div><blockquote type="cite" class=""><div dir="ltr" class=""><span class=""></span><br class=""><span class="">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.</span><br class=""></div></blockquote><div class=""><br class=""></div>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.<br class=""><div class=""><br class=""></div><div class="">Tor also assumes your connection is full duplex. (That is, there are separate limits of 10 MB/s up and 10 MB/s down.)</div><div class=""><br class=""></div><div class="">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.)</div><br class=""><blockquote type="cite" class=""><div dir="ltr" class=""><span class="">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.</span><br class=""></div></blockquote><div class=""><br class=""></div><div class="">Where are you seeing this observed bandwidth?</div><div class=""><br class=""></div><div class="">Tor reports its observed bandwidth over the busiest 10 second period each day.</div><div class=""><br class=""></div><div class="">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.)</div><div class=""><br class=""></div><div class="">If your connection is a high latency connection, Tor may send bandwidth to lower-latency connections.</div><div class=""><br class=""></div><div class="">You can read a similar thread here:</div><div class=""><a href="https://lists.torproject.org/pipermail/tor-relays/2020-April/018348.html" class="">https://lists.torproject.org/pipermail/tor-relays/2020-April/018348.html</a></div><br class=""><blockquote type="cite" class=""><div dir="ltr" class=""><span class="">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?</span><br class=""></div></blockquote><div class=""><br class=""></div><div class="">4000 seems pretty normal. There are only around 6000 relays.</div><div class="">Check your tor, kernel, and router logs for TCP warnings?</div><br class=""><blockquote type="cite" class=""><div dir="ltr" class=""><span class="">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.</span><br class=""></div></blockquote><div dir="ltr" class=""><br class=""></div>Setting your burst higher than your connection speed can cause latency or packet drops. Tor will allocate less bandwidth to slow or unreliable relays.<br class=""><div class=""><br class=""></div>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.<div class=""><br class=""></div><div class="">Tor will compensate for a burst by having a few slow seconds afterwards.<br class=""><div class=""><br class=""></div><div class="">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.)</div><br class=""><blockquote type="cite" class=""><div dir="ltr" class=""><span class="">For reference my relay’s fingerprint is F942EE73F1B8E39125F617FA85E80E4C9E540A2E.</span><br class=""></div></blockquote><br class=""></div><div class="">If you want Tor to use more bandwidth, try setting rate and burst to 10 Mbps.</div><div class=""><br class=""></div><div class="">That way, you won't be causing congestion or packet drops.</div><div class=""><br class=""></div><div class="">You may have to wait for a few weeks or months for your bandwidth to stabilise.</div><div class=""><a href="https://blog.torproject.org/lifecycle-new-relay" class="">https://blog.torproject.org/lifecycle-new-relay</a></div><div class=""><br class=""></div><div class="">T</div><div class=""><br class=""></div></div></div>_______________________________________________<br class="">tor-relays mailing list<br class=""><a href="mailto:tor-relays@lists.torproject.org" class="">tor-relays@lists.torproject.org</a><br class="">https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays<br class=""></div></blockquote></div><br class=""></div><div class=""><br class=""></div><div class="">Thank you,  I mistakenly thought the the Bandwidth limits were up+down, <span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">this really clarified many things.</span><div class=""><font color="#000000" class=""><br class=""></font></div><div class=""><br class=""></div></div><div class=""><br class=""></div><div class=""><br class=""><blockquote type="cite" class=""><div class="">Il giorno 14 apr 2020, alle ore 17:21, torjoy <<a href="mailto:south_america_bridges@protonmail.com" class="">south_america_bridges@protonmail.com</a>> ha scritto:</div><br class="Apple-interchange-newline"><div class="">Hi Mario,<br class=""><br class="">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.<br class=""><br class="">Luiz<br class=""><br class=""><br class="">Sent with ProtonMail Secure Email.<br class=""><br class=""><br class=""><br class="">_______________________________________________<br class="">tor-relays mailing list<br class=""><a href="mailto:tor-relays@lists.torproject.org" class="">tor-relays@lists.torproject.org</a><br class="">https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays<br class=""></div></blockquote><br class=""></div><div class=""><br class=""></div><div class="">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.</div><div class=""><br class=""></div><div class="">-m</div><div class=""><br class=""></div><div class=""><div class=""><br class=""></div></div></body></html>