[tor-bugs] #25268 [Core Tor/Tor]: cmux: Remove round robin code and make EWMA mandatory

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu Feb 15 17:13:03 UTC 2018


#25268: cmux: Remove round robin code and make EWMA mandatory
-------------------------+-------------------------------------------------
     Reporter:  dgoulet  |      Owner:  dgoulet
         Type:           |     Status:  assigned
  enhancement            |
     Priority:  Low      |  Milestone:  Tor: 0.3.4.x-final
    Component:  Core     |    Version:
  Tor/Tor                |   Keywords:  tor-cmux, tor-sched, tor-relay,
     Severity:  Normal   |  tor-circuit
Actual Points:           |  Parent ID:
       Points:           |   Reviewer:
      Sponsor:           |
-------------------------+-------------------------------------------------
 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).

 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 and make sure we stick to only the required code for
 this fast path

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/25268>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list