[tor-relays] CPU usage

Scott Bennett bennett at sdf.org
Tue Jul 8 07:16:59 UTC 2014

"Asa Rossoff" <asa at lovetour.info> wrote:

> On 7 July 2014, 04:49 UTC, Roman Mamedov wrote:
> > On Mon, 07 Jul 2014 21:31:02 +0100
> > kingqueen <kingqueen at btnf.tw> wrote:
> > 
> > > [stuff deleted  --SB]
> > 
> > Set "NumCPUs 2" in your torrc to make it try utilizing the second core
> > too
> > (this won't help much, but at least somewhat).
> With hyperthreading, I think 4 would be optimal?

     Probably, yes.

> Also, I'm not a regular user of Linux, but doesn't top report load averages
> as a sum of all CPUs/cores/virtual cores... e.g., in this case, if the
> described CPU were at capacity, top would report 4.00?

     No.  top reports the average number of processes in the system in the
ready-to-run state (more or less equivalent to the "dispatchable" state).
This state include not only those currently dispatched, but also those that
could be dispatched were enough otherwise idle [logical] CPUs available.
> If nothing else, this could be nicer to other running applications, but if
> tor was assuming one CPU/core previously, would actually increase the amount
> of CPU available to tor.
     On a high throughput node, it should make some difference, although
the degree of difference depends upon the number of onion skins to be
decrypted per unit of time.
     As has been stated here on multitudinous occasions, the real hangup
on spreading the workload of tor across extra CPUs is that openssl is not
a multithreaded library.

                                  Scott Bennett, Comm. ASMELG, CFIAG
* Internet:   bennett at sdf.org   *or*   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         *

More information about the tor-relays mailing list