advantage using multiple cpus

Roger Dingledine arma at mit.edu
Wed May 9 07:55:03 UTC 2007


On Wed, May 09, 2007 at 08:31:44AM +0200, Olaf Selke wrote:
> phobos at rootme.org wrote:
> > 	I suggest setting it to 2 and seeing if performance improves for
> > 	you.
> 
> I think this won't change anything cause one cpu still is doing all the
> work and the other three cpus will be more or less idle. But I'll check
> it...

Right. Tor has one main thread, which does TLS, signature verifications,
etc. It then has separate "cpuworker" threads that do onion decryption. As
you say, this doesn't divide everything evenly. But it is a start. :)

Once upon a time (before Tor 0.1.0.1-rc), the cpuworker threads were
separate processes. They still are separate processes on OpenBSD, NetBSD,
Solaris, and a few others due to pthreads problems on those platforms.

But now that most Tors use threads, it could be that we could share more
cpu work with the cpuworker threads. It would be great if somebody wants
to look into this. Our dependency on opaque OpenSSL functions for a lot
of the cpu-using activities makes this tougher.

--Roger



More information about the tor-talk mailing list