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
  • #25268

Closed (moved)
(moved)
Open
Created Feb 15, 2018 by David Goulet@dgoulet🆘

cmux: Remove round robin code and make EWMA mandatory

Since 0.2.4.x stable, Tor has been using EWMA circuit policy which is enabled by the consensus param: CircuitPriorityHalflifeMsec=30000

The circuitmux.c code still does quite a bit to maintain the round robin circuit policy that was used prior to EWMA. It hasn't been used since 024 (except in Chutney, see #25265 (moved)).

A lot of that code is called for every cell tor receives so it is part of our fast path. Removing this round robin code would help in performance and remove complexity from the code.

However, that round robin functionality is used as a fallback if the EWMA policy was either not set or couldn't pick an active circuit (I'm not sure that is possible if we have active circuits).

Thus, the side effect of removing this code is that we'll now enforce a cmux to have a policy set and make the pick_active_circuit() callback mandatory. That is OK because we've been enforcing that since 024.

It would also probably mean that we need to put in a default value in tor code for CircuitPriorityHalflifeMsec so that if the consensus doesn't specify it, we fallback to a usable value instead of being able to disable EWMA.

This piece of work will help out with improving performance of the cmux subsystem with #25152 (moved) and make sure we stick to only the required code for this fast path

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