Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
Trac
Trac
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar

GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

  • Legacy
  • TracTrac
  • Issues
  • #25152

Closed (moved)
Open
Opened Feb 05, 2018 by David Goulet@dgoulet😈

Try to call less circuitmux_find_map_entry()

The circuitmux_find_map_entry() function is currently taking more than 3% of the CPU on a busy relay. It is literally the second highest after curv25519 crypto stuff (which is expected to be high).

We can't really optimize that function so much but we can try to call it less! For instance, at every single cell we append to a circuit in append_cell_to_circuit_queue() we call update_circuit_on_cmux() which calls 4 functions in succession that calls circuitmux_find_map_entry():

  • circuitmux_is_circuit_attached()
  • circuitmux_attached_circuit_direction()
  • circuitmux_set_num_cells() and this function can call it again with circuitmux_make_circuit_inactive() or circuitmux_make_circuit_active().

This is quite a lot of CPU at each cell especially when we do have many many circuits.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Tor: unspecified
Milestone
Tor: unspecified
Assign milestone
Time tracking
None
Due date
None
Reference: legacy/trac#25152