Hardware for fast relay?

Hi!

How much memory does a 100 Mbit middle relay need?

I use a Raspberry Pi 4, 4Gb, is it enough to get up to high speeds around 100 Mbit?

If not, would a Raspberry Pi 4, 8Gb be a better choice, or something else?

Hello @Guybrush ,

For a middle relay, a raspberry pi 4 with 4 GB of RAM should be fine. But there are several points to take into account if you want to benefit from a bigger bandwidth.

  1. The CPU of the Raspberry Pi is limited, it is not designed for big calculations. So if you set the bandwidth limit too high, it will be blocked and overloaded because the CPU will not be fast enough.

  2. The amount of RAM makes little or no difference to the speed of connection processing. The process does not use much RAM as a middle relay.

Memory Requirements Tor Project | Relay requirements

  • A <40 Mbit/s non-exit relay should have at least 512 MB of RAM available.
  • A non-exit relay faster than 40 Mbit/s should have at least 1 GB of RAM.
  • On an exit relay we recommend at least 1.5 GB of RAM per tor instance.

Personally, I have already used a Raspberry Pi 3B as a middle relay, it was almost always in overloaded status despite the rather low bandwidth limit. I had set it to 5 MB/s and then to 3 MB/s. The results could be good for you, maybe it was a problem on my end.

My advice is to set the limit not too high and then check over several days with the console NYX if the load does not exceed 80% CPU on average. Then you can increase or decrease it according to the load.

What do you think ? Thanks

1 Like

For example: Brass Horn a UK non-profit is running 4 exit nodes using Raspberry Pi 4 8GB.

Metrics:

BHCARM64OpenBSD1 (4) 3.91 MiB/s 317d 17h United Kingdom 185.104.120.10 2a06:3000::10 ExitFastGuardHSDirRunningStableV2DirValid FallbackDirReachableIPv6IPv6 Exit 443 0 Relay
BHCARM64OpenBSD4 (4) 3.89 MiB/s 317d 17h United Kingdom 185.104.120.40 2a06:3000::40 ExitFastGuardHSDirRunningStableV2DirValid FallbackDirReachableIPv6IPv6 Exit 443 0 Relay
BHCARM64OpenBSD3 (4) 3.89 MiB/s 317d 17h United Kingdom 185.104.120.30 2a06:3000::30 ExitFastGuardHSDirRunningStableV2DirValid ReachableIPv6IPv6 Exit 443 0 Relay
BHCARM64OpenBSD2 (4) 3.86 MiB/s 317d 17h United Kingdom 185.104.120.20 2a06:3000::20 ExitFastGuardHSDirRunningStableV2DirValid ReachableIPv6IPv6 Exit 443 0 Relay

https://metrics.torproject.org/rs.html#search/family:2D4A70C67B4D663917E792A4F4F3622FFB80BFE0

4 Likes