7

In the purpose of setting up a Tor relay that makes good use of a fast FTTH connection, what computer will do the job most efficiently at the time of writing, provided the following requirements are met?

Requirements:

  1. best bandwidth usage / power consumption ratio
  2. must run Linux, any flavor of it but preferably GNU / free software (proprietary blobs not encouraged)
  3. low budget, let's say less than 250 US dollars?

The real capacity of the Internet connection is not known, but possibly capped at more than 1 Gbit/s. Not all the bandwidth needs to be made use of, speed / power ratio takes precedence.

Single board computers (Odroid, Raspberry Pi...) seem to be the winners at first sight. However I would like to get answers based on the specifics of Tor reference implementation, which I have no clue about. Would it benefit more from higher CPU clock frequency? Multiple cores? Bigger RAM? What does Tor need the most?

I tried to identify some of the basics:

  • cryptographic routines need:

    • fast CPU
    • is Tor optimized for specific instruction set (NEON, SSE, AVX...)?
    • is Tor optimized for several cores?
  • connection management need:

    • Gigabit link
    • lots of memory (2GiB as a bare minimum?)
    • big CPU cache

2 Answers 2

4

TL;DR:

  • Tor does not make much use of more than one core, two cores (or one hyperthreaded core) per process is best
  • a maximum of two Tor processes may register from a single IP, so a CPU with 4 cores is ideal
  • 64-bit is best for cryptography
  • 2 GiB of system memory is a bare minimum

Whilst I can't back it up with much technical details, this is from what I learnt in the last couple of months reading stuff and playing around with relays on different kinds of hardware. For me the Odroid C2 currently takes the prize with high-capacity connections (say 100+ Mbps), provided it runs two Tor processes.

The pros:

  • very low power consumption (compared to a server/desktop configuration)
  • 1 Gbps link
  • fast (2 GHz) 64-bit CPU
  • 2 GiB of RAM

The cons:

  • no support of the AES-NI instruction set, the only one that Tor/OpenSSL really needs

So far I've been able to squeeze 5-6 Mbytes of pure Tor traffic (directory listings excluded) from it, still increasing.

Information on technical requirements and how to configure and maintain a high-throughput relay may be found on the Tor Servers wiki. A reference documentation about Tor specifics can be found here under Machine Specs, e.g. speaking about cores:

Tor is currently not fully multithreaded, and tends not to benefit beyond 2 cores per process. Even then, the benefit is still marginal beyond just 1 core.

2
  • 1
    Do you say that a single Odroid C2 can deliver 5-6 Mbytes of traffic? That's pretty impressive. Do you run it with 1 or 2 Tor processes? And how is the CPU and memory load during that traffic?
    – Martin
    Aug 3, 2017 at 12:28
0

I think the (new) ODROID-H2+ board really fits well for these requirements. Since it comes with x86 architecture meaning you have AES-NI (new instruction) set for hardware acceleration. Which is really needed if you want to run a decent Tor relay/node.

Also you can install as many RAM memory (DIM slots) as you need, eg. 2 GB or 4GB, or 16GB or even more...

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .