Details
-
New Feature
-
Resolution: Unresolved
-
Minor
-
None
-
None
-
None
-
9223372036854775807
Description
The TBF policy is not aimed to provide improved performance, it achieves rate limit through I/O throttle. When I/O is throttling, it could not make full use of system resources even there are some ideal I/O service threads and spare disk I/O bandwidth. But for some use cases, it needs to have the ability to allocate spare capacity to the workloads or background jobs. In order to ensure efficient utilization of I/O resource, we propose a dependency rule strategy. The command of a dependency rule is shown as following:
start ruleB <matchCondition> deprule=ruleA lowerrate=$r1 upperrate=$r2
Where deprule represents the rule name of the dependent rule, which means, 'ruleB' depends on 'ruleA' ; the key 'lowerrate' indicates the lower bound of RPC rate limited value while the key 'upperrate' indicates the upper bound of RPC rate limited value. The principle is that the real RPC rate limited value of a rule is dynamically adjusted between the lowerrate and upperrate to obtain more I/O bandwidth according to the spare I/O capacity that its dependent rule does not make full use of.
To my reading, the specification of dependent rules will be complex and not easily handled by users. Instead, it seems like TBF could have "soft" scheduling of RPCs using the existing rules, and just not enforce RPC limits on classes if there are no RPCs of some higher priority in the queue. In essence (I think) a class with outstanding RPCs would continue to gain tokens (in proportion with the rate of lower-priority rules) while it has queued RPCs and higher priorities do not. Such rules could add a new keyword to specify rate_soft= or similar (since the current rate= is considered a hard limit today).