[tor-bugs] #2536 [Tor Relay]: Disable outgoing token bucket and reduce token bucket refill interval

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Thu Mar 24 14:07:25 UTC 2011


#2536: Disable outgoing token bucket and reduce token bucket refill interval
-------------------------+--------------------------------------------------
 Reporter:  karsten      |          Owner:                    
     Type:  enhancement  |         Status:  needs_review      
 Priority:  normal       |      Milestone:  Tor: 0.2.3.x-final
Component:  Tor Relay    |        Version:                    
 Keywords:               |         Parent:                    
   Points:               |   Actualpoints:                    
-------------------------+--------------------------------------------------

Comment(by Flo):

 Replying to [comment:5 nickm]:


 > I am skeptical about the "decrement the in-bucket when traffic is
 'generated internally' " approach.  It seems that it would require
 pervasive changes throughout the codebase.  I bet that the "adaptively
 decrease the read-rate until the write-limit is (almost) never reached)"
 approach would yield significantly more reliable and maintainable code.

 Is it so? With my current knowledge of the code, I would suspect that
 there are only two additional places to implement the mentioned
 modifications of our patch: (1) In connection_buckets_decrement() when
 counting bytes of directory traffic. There we need to subtract the
 num_written bytes off the readbucket. Btw: Apart from that a directory
 mirror answers requests only when capacity is available (see usage of
 global_write_bucket_low). (2) I am not exactly sure where it happens
 (probably in connection_edge_package_raw_inbuf), but we need to consider
 data that is less then the cells' payload. This difference needs to be
 subtracted off the readbucket too.

 Please tell me If I missed something here. Nevertheless this approach
 maintains the bandwidth limits strictly. In contrast the adaptive approach
 seems to be more inaccurate.

 > As for separating stuff: I meant separate patches, so that the features
 can be merged and reviewed independently.  If the short-refill-interval
 approach yields significant improvements, it shouldn't have to wait for
 the double-gating fixes to get revised.  I just talked to Karsten and
 Sebastian, and they said they'd like to try to split up the patch series
 into independent patches.  That'd be great!

 We have evidence that decreasing the refill-intervals only amplifies the
 double-door effects and therefore queues cells even longer. On the other
 side it makes the traffic less bursty and smoothens it. Btw: This will
 probably be also the fact with buffer-events enabled, where shorter
 intervals are used only. Measurements that confirm both are in progress.

 Therefore, in order to gain maximum improvements, we advise to enable both
 features. Though, technically it can be reviewed independently.

 Replying to [comment:6 karsten]:

 > Yes, Sebastian and I can help.  Where do we find the latest branch?

 Once we have agreed on a modification of the original proposal, I will
 finish and upload it to my public git-repository. At the moment there is
 the original patch available only.

 Thanks to all of you for your help.

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


More information about the tor-bugs mailing list