Opened 7 years ago

Last modified 3 months ago

#1749 accepted project

Split relay and link crypto across multiple CPU cores

Reported by: nickm Owned by: nickm
Priority: High Milestone: Tor: unspecified
Component: Core Tor/Tor Version:
Severity: Normal Keywords: tor-relay, term-project-ideas, threads, performance
Cc: Actual Points:
Parent ID: Points: 10
Reviewer: Sponsor:

Description (last modified by nickm)

Right now, Tor does nearly all of its work in one main thread. We have a basic "CPUWorker" implementation that we use for doing server-side onionskin crypto in a separate thread, but thanks to improvements long ago, server-side onionskin crypto on longer dominates. If we could split the work of relay AES-CTR crypto and SSL crypto across multiple threads, that would be pretty helpful in letting high-performance servers saturate their connections. (Blutmagie has wanted this for some while.)

Child Tickets:

#1760
Parallel Crypto: Design a good crypto parallelization plan and architecture


Child Tickets

TicketStatusOwnerSummaryComponent
#1760closedParallel Crypto: Design a good crypto parallelization plan and architectureCore Tor/Tor

Attachments (4)

relay.2.c (1.6 KB) - added by towelenee 3 years ago.
relay.c (1.6 KB) - added by towelenee 3 years ago.
Here is my changes for relay.c It use multiply cores by openMp, but it needs changes in Makefile.am
relay.3.c (2.5 KB) - added by towelenee 3 years ago.
relay.4.c (2.2 KB) - added by towelenee 3 years ago.
Last patch doesn't use openmp, just pthreads

Download all attachments as: .zip

Change History (17)

comment:1 Changed 7 years ago by nickm

Owner: set to nickm
Status: newaccepted
Type: defecttask

comment:2 Changed 7 years ago by nickm

Description: modified (diff)

comment:3 Changed 7 years ago by nickm

Milestone: Tor: 0.2.3.x-final

At least the relay crypto part of this should happen in 0.2.3.x

comment:4 Changed 6 years ago by karsten

Summary: Project: Split relay and link crypto across multiple CPU coresSplit relay and link crypto across multiple CPU cores
Type: taskproject

comment:5 Changed 6 years ago by nickm

Milestone: Tor: 0.2.3.x-finalTor: unspecified

comment:6 Changed 5 years ago by nickm

Milestone: Tor: unspecifiedTor: 0.2.4.x-final
Priority: normalmajor

comment:7 Changed 5 years ago by nickm

Keywords: tor-relay added

comment:8 Changed 5 years ago by nickm

Component: Tor RelayTor

comment:9 Changed 5 years ago by nickm

Milestone: Tor: 0.2.4.x-finalTor: unspecified

Added a sub-ticket for the relay component.

comment:10 Changed 4 years ago by elgo

May I suggest to get this at critical priority?
21th century crypto software can't afford to be not fully-threaded ;)
No CPU sold today is mono-core anymore, and I sure few people would run a tor dedicated relay up 24/24 to see it used at only 1/n'th of its capacity.

Changed 3 years ago by towelenee

Attachment: relay.2.c added

Changed 3 years ago by towelenee

Attachment: relay.c added

Here is my changes for relay.c It use multiply cores by openMp, but it needs changes in Makefile.am

Changed 3 years ago by towelenee

Attachment: relay.3.c added

Changed 3 years ago by towelenee

Attachment: relay.4.c added

Last patch doesn't use openmp, just pthreads

comment:11 Changed 19 months ago by nickm

Keywords: 6s194 added

comment:12 Changed 19 months ago by nickm

Keywords: term-project-ideas added; 6s194 removed

These tickets were tagged "6s194" as ideas for possible term projects for students in MIT subject 6.S194 spring 2016. I'm retagging with term-project-ideas, so that the students can use the 6s194 tag for tickets they're actually working on.

comment:13 Changed 3 months ago by nickm

Keywords: threads performance added
Points: 10
Severity: Normal
Note: See TracTickets for help on using tickets.