[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-relays] Sanity check on NumCPUs
Roger Dingledine <arma@xxxxxxxxxxxxxx> wrote:
> On Wed, May 25, 2022 at 07:31:41PM -0500, Thoughts 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 would suggest leaving NumCPUs alone, and let Tor use as many cores as
> you have. Setting it to 2, when you have more cores than that, will
> limit how much Tor can scale.
Does tor default to using the number of cores? Or the number of logical
CPUs?
>
> And that message you saw, which I assume was "Your computer is too slow
> to handle this many circuit creation requests!", is exactly about the
> number of cores that are allocated to handling incoming create cells.
>
> There are three main pieces to Tor's crypto, and two of them (TLS and AES)
> are bottlenecked on the main thread, but one of them (circuit handshakes)
> *does* parallelize pretty well.
>
> So if your Tor is complaining about not being able to keep up with
> circuit creation requests... consider removing the artificial limitation
> of setting NumCPUs lower than it wants to be. :)
I am running tor at present on an ancient machine with a QX9650 CPU,
so the CPU and LCPU counts are equal, both 4. If I let it default or set
NumCPUs 4, then at some point tor complains that it has to drop circuits
due to timeouts. The chip is ancient, but quite speedy for its time, and
I've bumped the multiplier from 9 to 10, so it runs at 3.333 GHz. I have
found through gradual increments of NumCPUs that 10 are not quite enough to
cover all situations that arise over a lengthy uptime, so several weeks ago
I increased it once again, this time to 12. Thus far tor seems happy with
that number.
Scott Bennett, Comm. ASMELG, CFIAG
**********************************************************************
* Internet: bennett at sdf.org *xor* bennett at freeshell.org *
*--------------------------------------------------------------------*
* "A well regulated and disciplined militia, is at all times a good *
* objection to the introduction of that bane of all free governments *
* -- a standing army." *
* -- Gov. John Hancock, New York Journal, 28 January 1790 *
**********************************************************************
_______________________________________________
tor-relays mailing list
tor-relays@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays