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

Re: [tor-relays] Would be good if Tor were more multithreaded.



The NumCPUs option only causes OnionSkins (circuit creation requests) to
be processed on additional threads. This is only a portion of the CPU
cost of a tor relay (doesn't include TLS, circuit-level AES, packet
handling/memory operations, etc), and now that the network is switching
over to the considerably faster ntor circuit handshake, it will become
an even smaller one.

Making Tor fully multithreaded for all of its CPU-intensive operations
is a large task. 

For now, the best option for high speed relays is to run multiple Tor
daemons with separate OR ports. If you have AES-NI, you can do about
300Mbit per Tor daemon. If not, you can do about 100Mbit per daemon. You
can run at most two daemons per external IP, so if you have a higher
capacity uplink than that, you have to get more IPs from your provider.

Sebastian Urbach:
> Hi,
> 
> Did you consider the numCPUs option ?
> --
> Mit freundlichen Grüssen / Sincerely yours
> 
> Sebastian Urbach
> 
> ----------------------------------------------
> Those who would give up essential Liberty,
> to purchase a little temporary Safety, deserve
> neither Liberty nor Safety.
> ----------------------------------------------
> Benjamin Franklin (1706 - 1790),  Inventor,
> journalist, printer, diplomat, and statesman
> 
> 
> 
> Here's where top hangs out on Libero. Seems it would be a better
> situation if Tor would actually use the second core.
> 
> top - 12:05:07 up 5 days, 21:35,  1 user,  load average: 0.33, 0.43, 0.34
> Tasks: 130 total,   2 running, 128 sleeping,   0 stopped,   0 zombie
> Cpu0  : 47.2%us, 21.0%sy,  0.0%ni, 17.6%id,  0.0%wa,  0.0%hi, 13.8%si,  0.3%st
> Cpu1  :  0.0%us,  0.3%sy,  0.0%ni, 99.7%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
> Mem:   1914136k total,   718704k used,  1195432k free,   139588k buffers
> Swap:  3981304k total,        0k used,  3981304k free,   116320k cached
> 
>  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
> 1340 _tor      20   0  566m 224m  36m R 71.7 12.0   6168:37 tor
> 9887 nobody    20   0 21644  13m  892 S  7.3  0.7   0:31.85 scamper
> 9889 root      20   0  102m  916  772 S  0.7  0.0   0:02.80 sed
> 9921 root      20   0 15028 1312  992 R  0.3  0.1   0:00.19 top
>    1 root      20   0 19232 1480 1212 S  0.0  0.1   0:00.27 init
>    2 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kthreadd
> 
> 
> 
> 
> _______________________________________________
> tor-relays mailing list
> tor-relays@xxxxxxxxxxxxxxxxxxxx
> https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays
> 
> 
> _______________________________________________
> tor-relays mailing list
> tor-relays@xxxxxxxxxxxxxxxxxxxx
> https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays

-- 
Mike Perry

Attachment: signature.asc
Description: Digital signature

_______________________________________________
tor-relays mailing list
tor-relays@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays