cockroachdb / cockroachdb/cockroach

kvserver: pace range split stats computation

Open
#125,948 0 comments 0 reactions 0 assignees View on GitHub
C-enhancement T-kv
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

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

After https://github.com/cockroachdb/cockroach/issues/22348, the amount of data scanned for stats computation increased. When there are multiple splits occurring in parallel on the same store, this can consume a large amount of CPU.

**Describe the solution you'd like**

Pace range split stats computation, such as integrating with the elastic AC CPU limiter.

**Describe alternatives you've considered**
We should also spread out splits where possible, to reduce the likelihood of multiple splits occurring at once. See https://github.com/cockroachdb/cockroach/issues/22348.

**Additional context**

Note that some range splits, such as load based, should not be delayed as timely splits are depended upon for load rebalancing. Similarly, a range will begin backpressuring writes after the range exceeds a certain threshold above the maximum range size -- any solution here will need to make a tradeoff between backpressure and pacing stats computation.

Jira issue: CRDB-39679

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.