pingcap / pingcap/tidb

A fine-grained cluster resource management (tidb side)

Open
#41,574 0 comments 0 reactions 1 assignee Claimed by @tiancaiamao View on GitHub
type/feature-request
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Feature Request

There is a similiar resource control feature https://github.com/pingcap/tidb/issues/38825 which focus on the whole **tidb cluster**, at a global level.
While this one can be seen as a sub task of that and **it focus on the tidb component only**,
and more specifically the CPU resource as tidb is the compute layer.

**Is your feature request related to a problem? Please describe:**

The problem can be divided into two categories:

- AP / TP workload
- background task & foreground task

Then they run together, they affect each other.
For example, a heavy query affect the latency of the running SQL and cause a latency spike.
Or, the DDL / GC / Analyze workers run periodly and affect the process's behaviour.

**Describe the feature you'd like:**

I'd like to solve those problems case by case.
TiDB have so many "new features" and the new feature list tend to explode, so I think that's enough.
Let's make more enhancement rather than bragging "now we have a new feature..."

But still, we need to consider the usability and observability

- Usability

Shall we provide/define new User API?

No configuration is the best configuration.

- Observability

List the cases:

- [ ] #41575
- [ ] #41578

**Describe alternatives you've considered:**

**Teachability, Documentation, Adoption, Migration Strategy:**

[A Customized Goroutine Scheduler over Golang Runtime](https://github.com/tiancaiamao/sched), the key of making it possible.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.