[tor-relays] CPU usage

Asa Rossoff asa at lovetour.info
Tue Jul 8 06:30:22 UTC 2014

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:
> > Hi, I'm running a Tor relay on a low cost dedicated server.
> >
> > The tor relay is named kingqueen and it's running on an Intel Atom
> N2700 dual core hyperthreaded CPU with 2gb of memory, in a data centre
> with a symmetric 100mbps connection.
> >
> > I have found as time goes on and usage of my relay increases (about 3
> weeks now) that the Tor process is increasingly using more of the CPU.
> TOP shows Tor using over 100% of CPU and the load average is 2 or more.
> >
> > I use the dedi for other, less intensive things (OpenVPN, seedbox,
> also Owncloud though this falls over). I know that this is sub-optimal
> and ideally the dedi should be for the relay alone.
> >
> > I was wondering if the CPU usage is standard. I guess it could be,
> given it has decryption work to be done? Is it high? Is there anything
> I can do to lower it, other than rate limiting, which I don't want to
> do?
> Hello,
> Yes this is normal.
> 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?
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?

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.


> Also you should renice tor to e.g. +10 so that it doesn't interfere
> with your
> non-Tor tasks. In Debian-based distros this should be configurable via
> "/etc/default/tor" config file, by setting NICE="--nicelevel 10" there.
> --
> With respect,
> Roman
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 6787 bytes
Desc: not available
URL: <http://lists.torproject.org/pipermail/tor-relays/attachments/20140707/8bc56c00/attachment-0001.bin>

More information about the tor-relays mailing list