Opened 4 years ago

Closed 7 months ago

#12169 closed enhancement (invalid)

Improve speed by fixing tor_memeq performance, bottleneck(s)

Reported by: nickm Owned by:
Priority: Medium Milestone: Tor: 0.3.4.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: tor-relay, performance, maybe-irrelevant, review-group-34
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

According to some #11332 results, tor_memeq shows up a bit high in our profiles. We can speed it up a bit, and remove one critical-path case of it.

Branches to follow.

Not sure if this is 0.2.5 or not.

Child Tickets

Change History (18)

comment:1 Changed 4 years ago by nickm

Summary: Improve speed tor_memeq bottleneck(s)Improve speed by fixing tor_memeq performance, bottleneck(s)

comment:2 Changed 4 years ago by nickm

Status: newneeds_review

Branch "bug12169_relay_check" fixes code in relay_digest_matches not to call tor_memneq().

Branch "bug12169_faster_memeq" makes tor_memeq() much much faster by taking inputs 4 bytes at a time. It includes a benchmark.

comment:3 Changed 4 years ago by nickm

If you like bug12169_faster_memeq, see bug12169_fastest_memeq. It uses inline optimized implementations for common sizes to try to make the code run even faster. For those sizes, it's going 5-13x faster than it was when we started.

Obviously, these all need really close review.

comment:4 Changed 4 years ago by nickm

Parent ID: #11332

comment:5 Changed 4 years ago by nickm

Keywords: 025-triaged added

Calling 025-triaged for "bug12169_relay_check". The rest can wait for 0.2.6

comment:6 Changed 4 years ago by nickm

Keywords: 025-triaged removed
Milestone: Tor: 0.2.5.x-finalTor: 0.2.6.x-final
Type: defectenhancement

Andrea and Roger both like bug12169_relay_check. Merging that, postponing the rest.

comment:7 Changed 4 years ago by nickm

Keywords: 026-triaged added

We should consider the rest of this for 0.2.6 if tor_memeq() still shows up in profiles to any significant extent. But if not, we should defer this indefinitely.

comment:8 Changed 4 years ago by nickm

Keywords: 026-triaged-0 added; 026-triaged removed

comment:9 Changed 4 years ago by nickm

Keywords: 026-triaged-0 removed
Milestone: Tor: 0.2.6.x-finalTor: 0.2.???
Parent ID: #11332

After fixes in 0.2.5.5-alpha, this doesn't appear so high in profiles any more. Deferring.

comment:10 Changed 2 years ago by teor

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

Milestone renamed

comment:11 Changed 23 months ago by nickm

Severity: Normal
Status: needs_reviewnew

comment:12 Changed 23 months ago by nickm

Status: newneeds_review

comment:13 Changed 22 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:14 Changed 17 months ago by nickm

Keywords: tor-03-unspecified-201612 removed

Remove an old triaging keyword.

comment:15 Changed 17 months ago by nickm

Keywords: maybe-irrelevant added

comment:16 Changed 8 months ago by teor

Milestone: Tor: unspecifiedTor: 0.3.4.x-final

Move all needs_review tickets without a release to 0.3.4

comment:17 Changed 8 months ago by nickm

Keywords: review-group-34 added

comment:18 Changed 7 months ago by dgoulet

Resolution: invalid
Status: needs_reviewclosed

Current profiling doesn't show this anymore. If it shows up again, lets address.

Note: See TracTickets for help on using tickets.