Refill token buckets less often on slow connections#2707
Refill token buckets less often on slow connections#2707robgjansen merged 1 commit intoshadow:mainfrom
Conversation
Codecov ReportBase: 67.21% // Head: 68.14% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #2707 +/- ##
==========================================
+ Coverage 67.21% 68.14% +0.92%
==========================================
Files 203 203
Lines 30484 30515 +31
Branches 5961 5971 +10
==========================================
+ Hits 20491 20795 +304
+ Misses 5329 5004 -325
- Partials 4664 4716 +52
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
|
Tor benchmark results seem reasonable: |
0363a9f to
b6f0e3c
Compare
|
The simulation did seem to get a bit slower in the tor benchmark, but I would have expected the opposite. Maybe worth waiting for tonight's nightly to run, rebasing this PR, and then running the simulation again to check if it was just within error since the weekly has large error bars. But I'm fine either way since I don't see anything wrong with this PR. |
b6f0e3c to
afdc4aa
Compare
|
Rebased and ran another Tor benchmark as suggested, and the performance is in line with the nightly from last night: (We currently think the regression on the nightly was from #2632.) |
The token bucket now returns the time that the next packet conforms, ie how long until we will have enough tokens to forward that packet. Returning this instead of how long until the next refill reduces the overall number of forwarding events we need to schedule, and is especially helpful on slow connections.
afdc4aa to
d5e9187
Compare


The token bucket now returns the time that the next packet conforms, ie how long until we will have enough tokens to forward that packet. Returning this instead of how long until the next refill reduces the overall number of forwarding events we need to schedule, and is especially helpful on slow connections.