A Global Resource Control mechanism that limits multiple applications' resource usage in a shared TiDB cluster, avoids interference between applications.
Here a tiny example of the SQL interface.
CREATE RESOURCE GROUP `group_name` RRU_PER_SECOND=10000, WRU_PER_SECOND=10000.
ALTER RESOURCE GROUP `group_name` RRU_PER_SECOND= 20000;
/* bind resource group to user*/
ALTER USER user_name RESOURCE GROUP resouce_group_name;
/* reset to default systemn resource group for the current session*/
SET CURRENT RESOURCE GROUP DEFAULT;
Above the example shown, it's easy to set up for users or tenants. In theory, we can measure at the requested level, it is able to aggregate at different levels, so it is possible to bind the resource unit limit to the user or the session to a group.
Feature Request
Background
A Global Resource Control mechanism that limits multiple applications' resource usage in a shared TiDB cluster, avoids interference between applications.
Design
RFC: https://github.com/pingcap/tidb/blob/master/docs/design/2022-11-25-global-resource-control.md
Details
Interface and Configuration Part
Here a tiny example of the SQL interface.
Above the example shown, it's easy to set up for users or tenants. In theory, we can measure at the requested level, it is able to aggregate at different levels, so it is possible to bind the resource unit limit to the user or the session to a group.
Tasks
SQL Interface
BURSTABLEmake resources elastic #40380Proto
Resource Group Meta Manager
Storage Node Level Control [For Scheduling]
Global Quote Flow Control Module [For Quota Limit]
Decouple priority
done
Compatibility With Other Components
BR #42266