Opened 5 years ago

Last modified 15 months ago

#9664 needs_revision enhancement

Precompute ephemeral keypairs for ntor

Reported by: nickm Owned by: nickm
Priority: Medium Milestone: Tor: unspecified
Component: Core Tor/Tor Version: Tor: 0.2.7
Severity: Normal Keywords: tor-relay, ntor, performance, cpu, latency
Cc: Actual Points:
Parent ID: #9662 Points: 3
Reviewer: Sponsor:

Description

In the ntor handshake, on the server side, we need to generate a new y,Y pair for every handshake. But there's no reason this needs to happen on demand; instead, it could be lovely to do batches of them ahead of time, so that we can respond to requests faster. This wouldn't lower our CPU requirements when we were under load, but it might help us with circuit creation latency under less-than-horrible loads.

Before we go ahead and do this, it might be clever to verify that there are in fact times when cpuworkers are idle on busy servers.

Child Tickets

Change History (23)

comment:1 Changed 4 years ago by nickm

Milestone: Tor: 0.2.5.x-finalTor: 0.2.???

comment:2 Changed 3 years ago by nickm

Milestone: Tor: 0.2.???Tor: 0.2.7.x-final

These may be worth looking at for 0.2.7.

comment:3 Changed 3 years ago by nickm

Status: newassigned

comment:4 Changed 3 years ago by nickm

Keywords: 027-triaged-1-in added

Marking some tickets as triaged-in for 0.2.7 based on early triage

comment:5 Changed 3 years ago by isabela

Keywords: SponsorU added
Points: medium
Version: Tor: 0.2.7

comment:6 Changed 3 years ago by nickm

Milestone: Tor: 0.2.7.x-finalTor: 0.2.8.x-final

comment:7 Changed 3 years ago by nickm

Keywords: SponsorU removed
Sponsor: SponsorU

Bulk-replace SponsorU keyword with SponsorU field.

comment:8 Changed 3 years ago by nickm

Severity: Normal
Status: assignedneeds_revision

I'm not sure about precomputation in general, but it's pretty easy to do for the create cell case. I have a not-quite-complete branch in pregen_curve25519 that might make it look worthwhile.

Why is this branch incomplete?

  • It needs to start calling cpu_init() unconditionally, like #13737 does.
  • It may break some tests.
  • Linking isn't quite right.

comment:9 Changed 3 years ago by nickm

Milestone: Tor: 0.2.8.x-finalTor: 0.2.9.x-final

It is impossible that we will fix all 188 currently open 028 tickets before 028 releases. Time to move some out. This is my second pass through the "needs_revision" tickets, looking for things to move to 0.2.9.

Note that if the requested revisions happen in advance of the 0.2.8 freeze, they can get considered for 0.2.8.

comment:10 Changed 2 years ago by isabela

Sponsor: SponsorUSponsorU-can

comment:11 Changed 2 years ago by nickm

Owner: set to nickm
Status: needs_revisionassigned

setting owner.

comment:12 Changed 2 years ago by nickm

Status: assignedneeds_revision

comment:13 Changed 2 years ago by nickm

Keywords: tor-dos added

comment:14 Changed 2 years ago by isabela

Points: medium3

comment:15 Changed 2 years ago by nickm

Milestone: Tor: 0.2.9.x-finalTor: 0.2.???

Deferring; I don't see a huge benefit for this right now.

comment:16 Changed 2 years ago by nickm

Keywords: tor-dos removed
Sponsor: SponsorU-can

comment:17 Changed 21 months ago by teor

Milestone: Tor: 0.2.???Tor: 0.3.???

Milestone renamed

comment:18 Changed 20 months ago by nickm

Keywords: tor-03-unspecified-201612 added
Milestone: Tor: 0.3.???Tor: unspecified

Finally admitting that 0.3.??? was a euphemism for Tor: unspecified all along.

comment:19 Changed 15 months ago by nickm

Keywords: tor-03-unspecified-201612 removed

Remove an old triaging keyword.

comment:20 Changed 15 months ago by nickm

Keywords: 027-triaged-in added

comment:21 Changed 15 months ago by nickm

Keywords: 027-triaged-in removed

comment:22 Changed 15 months ago by nickm

Keywords: 027-triaged-1-in removed

comment:23 Changed 15 months ago by nickm

Keywords: cpu latency added
Note: See TracTickets for help on using tickets.