cockroachdb / cockroachdb/cockroach
kvserver: pace range split stats computation
- 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
Assessment
This issue has not been assessed yet.