[tor-bugs] #3630 [Tor Relay]: Reduce token bucket refill interval
Tor Bug Tracker & Wiki
torproject-admin at torproject.org
Thu Sep 22 19:05:52 UTC 2011
#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):
Replying to [comment:13 karsten]:
> Patch looks good. I didn't compile or test anything, but I read the
code. Here are a few comments:
>
> - The documentation of `connection_bucket_refill_helper` in
`connection.c` says the burst value is measured per refill interval, but
`connection_bucket_refill` passes the value from `options->BandwidthBurst`
which is still per second. Are we sure we're using the right burst value?
Ah; that comment was wrong. Fixing.
There is *no such thing* as a "burst per second" or "burst per
millisecond" or "burst per anything." In a leaky-bucket rate limiting
system, the "rate" is the rate at which the bucket fills up, and the
"burst" is the maximum size of the bucket. The units for rate are data-
amount per time, but the units for burst are just in data-amount.
> - There's a copy-paste error in the calls of
`connection_bucket_refill_helper` where one of the `"global_read_bucket"`s
should be `"global_write_bucket"`.
Fixed
> - The documentation in `or.h` says that `TokenBucketRefillInterval` is
ignored when bufferevents are enabled. This isn't the case anymore,
right?
Fixed.
I'm going to commit a change for those on feature3630, then rebase into a
feature3630-rebased branch, and then merge that in a bit. Thanks for the
review!
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/3630#comment:14>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list