[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-bugs] #3630 [Tor Relay]: Reduce token bucket refill interval



#3630: Reduce token bucket refill interval
-------------------------+--------------------------------------------------
 Reporter:  Flo          |          Owner:                    
     Type:  enhancement  |         Status:  needs_review      
 Priority:  major        |      Milestone:  Tor: 0.2.3.x-final
Component:  Tor Relay    |        Version:                    
 Keywords:               |         Parent:                    
   Points:               |   Actualpoints:                    
-------------------------+--------------------------------------------------

Comment(by nickm):

 Okay, moving forward!

 The check in options_act() should probably move to options_validate():
 That way, we can reject attempts to change TokenBucketRefillInterval to
 something unacceptable.  Also, the check doesn't match the manpage, which
 says it must be a divisor or multiple of 1 second.  Easy enough to fix.

 The floor for TokenBucketRefillInterval should probably be 1, not 0.
 (What would a refill interval of 0 mean, anyway?)

 > I definitly see your point. My pragmatic approach to solve this issue
 would be to restrict precision in which users can specify the rate and
 burst parameter to a magnitude of kilobytes. By doing so we avoid round-
 offs in the calculations because in this case rate % 1000 = 0. In my
 opinion a higher precision than kilobyte doesn't make sense to me anyway.
 Does this sound feasible to you?

 I think so.  My personal preference would be to instead have rate be
 tracked in in terms of "bytes per tick", where tokenbucketrefillinterval
 is defined to be one tick.

 This all looks fixable; I'll start working on a branch here.

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/3630#comment:10>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs