Skip to content

Global Resource Quota Control  #38825

Closed
Closed
@nolouch

Description

@nolouch

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.

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.

Tasks

SQL Interface

Proto

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

Metadata

Metadata

Labels

type/feature-requestCategorizes issue or PR as related to a new feature.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions