Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Tor Tor
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 832
    • Issues 832
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 32
    • Merge requests 32
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • The Tor Project
  • Core
  • TorTor
  • Issues
  • #24914

Closed
Open
Created Jan 16, 2018 by David Goulet@dgoulet🔆Owner

Maybe make relay_digest_matches() not use tor_malloc()

The relay_digest_matches() is used in relay_crypt() and it is called for a huge portion of cells that come through the relay.

Roughly speaking, if a relay is at 10MB/s and with cells of size 514 bytes, we are talking about a bit less than 20k cells per second meaning more than a million tor_malloc(20) per minute. This is the place:

  backup_digest = crypto_digest_dup(digest);

I think we should find a way to avoid this especially in the fast path of tor in order to avoid memory fragmentation as much as possible.

We could either use the stack, a static value or memarea subsystem.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking