[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: advantage using multiple cpus



Roger Dingledine wrote:
> On Wed, May 09, 2007 at 08:31:44AM +0200, Olaf Selke wrote:
>> phobos@xxxxxxxxxx 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.
I don't think that's the problem. If we made one thread per TLS
connection we would be able to parallelize that part. The key
negotiation can also be parallelized per circuit. This would fill up
process queues rather effectively however.
Watson Ladd
> 
> --Roger
> 
> 


Attachment: signature.asc
Description: OpenPGP digital signature