[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-relays] Running on a Raspberry Pi



Over the last month, I've been benchmarking the Raspberry Pi 4 on a fiber 1 Gbps up/down connection with the hope I could utilize the full connection throughput.

TDLR: Each tor instance per CPU core maxes out at ~ 6 MB/s. I was able to get two instances (ORPort 80 and 443) maxed out concurrently at ~ 6 MB/s with 1 IP address using the built-in ethernet port.

I have a desktop with Intel CPU, 24 cores, around 3.5 Ghz, and it's able to max out around ~25 MB/s behind the same switch, router, and fiber 1 Gbps up/down connection, which shows the connection is capable of more bandwidth, but the Raspberry Pi 4 is the bottleneck.
The benchmarking methodology that I used was to set the Tor Browser to pin to my relay as either entry or middle node, create multiple large file downloads through the relay using various other exit nodes, until my relay throughput stopped increasing, as shown through nyx. The ~6 MB/s was steady for 10 minutes to ensure it was the bottleneck. I was able to replicate these results at various times of day and various days of the week.
htop also showed the CPU core at maximum utilization and periodically, it would show all 4 of the cores go busy for ~10-15 seconds due to multiple tor process instances and then back to only 1-2 cores busy (depending on whether I had 1 or 2 tor instances maxed out on bandwidth). I wasn't sure what to make of these results.

I did frequently encounter an open issue w/tor but assumed it had no impact on the throughput of the relay: https://trac.torproject.org/projects/tor/ticket/31136

The Raspberry Pi 4 CPU does overheat fairly quickly and was getting throttled so I had to use a fan, which does keep the CPU temperature cooler, I have it set to and it does stay under 60 C rather than the throttling around 80+C.
For the fan, I'm using https://learn.pimoroni.com/tutorial/sandyj/getting-started-with-fan-shim. For the case I'm using with the fan: https://shop.pimoroni.com/collections/pibow. For storage in the Raspberry Pi 4, I'm using this sdcard: https://www.amazon.com/SanDisk-128GB-Extreme-microSD-Adapter/dp/B07FCMKK5X. For power, I'm using the standard Raspberry Pi 4 power supply: https://www.raspberrypi.org/products/type-c-power-supply/

Suggested next steps would be to sort of there are any other steps to further tune the Raspberry Pi 4. Example: Some of the linux settings: https://www.mail-archive.com/or-talk@xxxxxxxxxxxxx/msg14159.html
I do plan to write this up more formally and post somewhere in the future, but in the mean time, wanted to share here so others can reference and help provide feedback if there are further improvements to be made on the raspberry pi 4.
I'm open to any other thoughts/suggestions/comments on how to get more throughput running a tor relay node on the Raspberry Pi 4.


Sent with ProtonMail Secure Email.

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Thursday, September 12, 2019 4:50 PM, William Denton <wtd@xxxxxxxxx> wrote:

> On 10 September 2019, ronqtorrelays@xxxxxxxxxx wrote:
>
> > From what I have read about the Pi 4, heat is a big issue. If you're not doing
> > something to cool it, your CPU speed is likely being throttled due to
> > overheating.
>
> I'm not doing any cooling except for not having it in case. I'm in Canada, and
> with winter coming I can leave it hanging inside a window, and that'll cool it
> down some.
>
> The speed on the relay has picked up to about a quarter of what it was (so about
> six gigs a day), and I'll wait and see if it continues to increase, and then
> maybe fiddle with the config.
>
> So, if a Pi is cheap to buy and easy to use and maintain, I'm happy to use it
> for a relay, even if it's not a major contributor to the network.
>
> Bill
>
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> William Denton :: Toronto, Canada --- Listening to Art: https://listeningtoart.org/
> https://www.miskatonic.org/ --- GHG.EARTH: http://ghg.earth/
> Caveat lector. --- STAPLR: http://staplr.org/
>
> tor-relays mailing list
> tor-relays@xxxxxxxxxxxxxxxxxxxx
> https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays


_______________________________________________
tor-relays mailing list
tor-relays@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays