Opened 8 years ago

Last modified 3 years ago

#7134 needs_information project

Add statistics on time spent on crypto operations

Reported by: karsten Owned by:
Priority: Medium Milestone: Tor: unspecified
Component: Core Tor/Tor Version:
Severity: Normal Keywords: tor-relay metrics cpu performance sponsor8-maybe
Cc: nickm, andrea, cass Actual Points:
Parent ID: #7357 Points:
Reviewer: Sponsor: SponsorZ


We'd like to find out how much of Tor's time is spent on which crypto operations, and we'd want to answer this question over time.

These statistics would help us understand the implications of other design shifts -- like directory guards, where one of the desired side effects is a reduced number of TLS handshakes for relays because clients handshake with fewer relays. Another benefit could be that we'd have better data on hardware requirements for the Torouter and similar projects, in particular crypto operations performed by an average relay or bridge.

Probably the easiest way to achieve the "answer over time" part would be to have relays/bridges add a new line to their extra-info descriptors, and later look at metrics archives to see how things changed over time. There should not be too big privacy implications if we make the granularity sufficiently big.

We might want to make this feature optional, since it takes time to check the time. (Gotta find out how many nanoseconds for a hi-resolution timers vs how many nanoseconds for encrypting a cell. That would be part of the design.)

Child Tickets

Change History (10)

comment:1 Changed 8 years ago by karsten

Roger adds that we might get a lot of what we're looking for not by looking at "time taken" but by counting crypto operations. How many create cells did the relay handle? How many TLSes did it do? How many cells did it do AES on? Whether we want to count operations or milliseconds is not really something we need to decide quite yet.

comment:2 Changed 8 years ago by nickm

Keywords: tor-relay added

comment:3 Changed 8 years ago by karsten

Parent ID: #7357

comment:4 Changed 4 years ago by cass

Cc: cass added
Severity: Normal

This ticket is tagged SponsorZ, but it looks like progress stalled four years ago. Is this still an active issue that needs funding? (E.g., has a new line been added to to extra-info descriptors or has the issue been solved in some other way?)

comment:5 Changed 4 years ago by nickm

Cc: dgoulet added

dgoulet, does your trace stuff help here?

comment:6 Changed 4 years ago by dgoulet

Cc: dgoulet removed
Keywords: SponsorZ removed
Milestone: Tor: unspecifiedTor: 0.2.???
Sponsor: SponsorZ
Status: newneeds_information

The tracing stuff is in #13802 and in needs_review which has been used by Rob and pastly for KIST measurements.

We could easily add tracepoints to the crypto subsystem, have some sorts of counters and report that data in the extra-info. Most important thing here is really to not slow down Tor has that crypto will be on the fast path.

Is this something we need soon-ish/now? And if so, I can take few cycles to do this?

comment:7 Changed 4 years ago by teor

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

Milestone renamed

comment:8 Changed 4 years 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:9 Changed 3 years ago by nickm

Keywords: tor-03-unspecified-201612 removed

Remove an old triaging keyword.

comment:10 Changed 3 years ago by nickm

Keywords: metrics cpu performance sponsor8-maybe added
Note: See TracTickets for help on using tickets.