[tor-relays] Sanity check on NumCPUs

Roman Mamedov rm at romanrm.net
Fri May 27 17:55:08 UTC 2022


On Wed, 25 May 2022 19:31:41 -0500
Thoughts <thoughts at kevinsthoughts.com> wrote:

> For a non-exit relay, is "NumCPUs 2" still the recommended maximum?   
> Running on a quad core and recently saw a message indicating I had 
> insufficient CPU power to support the desired number of connections...

I'm not sure why would it be "the recommended maximum" to begin with.

It would make sense in context of running 2 instances of Tor on a 4-core
machine, to limit each to 2 CPUs, and then pin them to cores 0-1 and 2-3
respectively with "taskset", for better cache locality and to ensure they
never interfere with each other.

Running only 1 instance with "NumCPUs 4" will not be as effective in total
throughput as the setup described above. But if you aren't going to run a 2nd
instance in any case, there's nothing to stop you from setting that to 4, or
removing that line altogether and letting Tor autodetect the number of cores.

-- 
With respect,
Roman


More information about the tor-relays mailing list