Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #24914

Closed (moved)
(moved)
Open
Created Jan 16, 2018 by David Goulet@dgoulet🆘

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