[tor-bugs] #12890 [Tor]: Design and implement optimizations for socket write limits

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu Jun 25 21:41:22 UTC 2015


#12890: Design and implement optimizations for socket write limits
-----------------------------+------------------------------------------
     Reporter:  robgjansen   |      Owner:
         Type:  enhancement  |     Status:  assigned
     Priority:  normal       |  Milestone:  Tor: 0.2.???
    Component:  Tor          |    Version:
   Resolution:               |   Keywords:  tor-relay, 027-triaged-1-out
Actual Points:               |  Parent ID:  #12541
       Points:               |
-----------------------------+------------------------------------------

Comment (by robgjansen):

 I merged nickm's 'kist' branch with tag 'tor-0.2.6.2-alpha' and then made
 several updates to the kist code. The
 [https://trac.torproject.org/projects/tor/attachment/ticket/12890/kist-
 updates-0262.tar 6 commits are attached here]. I kept the changes as
 separate commits so it is easier to review each change.

 The most significant change is a quick algorithm that I hacked together to
 compute an adaptive interval length for how often `getsockopt()` needs to
 be called to get an updated tcp_info state for that socket. The hope is
 that this will avoid unnecessary context switches; for example, if we just
 sent some data and need an ACK before the window will get updated, then we
 can wait for about RTT milliseconds before asking the kernel for new TCP
 info.

 I'm hoping for help with these things:
   1. merge the code somewhere public and with a proper [more recent]
 version of Tor? Perhaps in nickm's public kist branch?
   2. review the existing code (I added questions with an XXX and TODO
 label)
   3. help from someone to properly code the part labeled with FIXME, if
 needed: if the socket_table was a min heap, that would tighten our socket
 descriptor iteration loop.

 I've done some testing in Shadow and will post the results in #12891.

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


More information about the tor-bugs mailing list