forked from scylladb/seastar
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fair_queue: Replenish tokens on grab, not by timer
Right now tokens replenisher runs from steady-clock timer of a group. This generates several troubles. First is that the replenishing rate is hard-coded to be 500 usec and it has no justification other than "seems to work decent enough with default latency goal". Next, when the reactor is idling it's woken up by this timer frequent enough to generate a noticeable user time. And finally, the timer sits on a group and is thus run by a single shard thus making the whole group depending on this shard stallness. The proposed fix is to make each shard replenishing the capacity when it really needs it. Benefits of this approach are: - no magic 500us constant for replenish rate - no dependency on a single shard rate (replenisher is shard-safe) - no user-time generation when idling fixes: scylladb#996 Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
- Loading branch information
Showing
4 changed files
with
31 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters