[tor-relays] "NumCPUs 2" or 2 copies of Tor?

Andy Isaacson adi at hexapodia.org
Wed Aug 7 22:00:59 UTC 2013


On Wed, Aug 07, 2013 at 10:28:59PM +0200, Moritz Bartl wrote:
> On 07.08.2013 22:11, Steve Snyder wrote:
> > Given plenty of RAM, a muti-core CPU and a single IP address, which is
> > more efficient:
> > 
> > a single instance of Tor configured with "NumCPUs 2" or 2 instances of
> > Tor configured with "NumCPUs 1" and different port numbers?
> 
> Tor does not scale well across multiple cores. If you hit a single core
> limit, you will have to spin up more processes. NumCPU does not help much.

That's true at the limit, 200 Mbps or more needs more than 1 daemon.

But with a single IP, running another daemon won't help as much as we'd
like.  Many client nodes are limited in the ports they can connect to.

So, I would only recommend running multiple processes if you need it to
fill your bandwidth.  Using "NumCPUs 2" does, in my limited testing,
provide some improvements in max throughput over a single thread.  So
use that if you're CPU bound but only by a small margin.

-andy


More information about the tor-relays mailing list