cockroachdb / cockroachdb/cockroach

batcheval: add observability into per-request elastic CPU limiting

Open
#101,685 3 comments 0 reactions 0 assignees View on GitHub
A-disaster-recovery C-enhancement T-disaster-recovery
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

The elastic CPU limiter helps minimize the impact of ExportRequests on foreground SQL latency by pre-empting + paginating requests that take longer than their allocated CPU slice. As observed in https://github.com/cockroachdb/cockroach/issues/101683#issuecomment-1512057783, in some scenarios this pagination is not free of cost. Adding more observability to be able to quickly judge how aggressively (or not) the limiter is during an operation that issues ExportRequests (backup, fingerprinting) will be helpful. Some ideas would be:

- A metric tracking how many ExportRequests are getting pre-empted by the CPU limiter.
- A metric tracking how many keys are being processed before we're getting pre-empted by the limiter.

Epic: CRDB-8964

Jira issue: CRDB-27090

Contributor guide

Open the contributing guide

Research direction

Start in the batcheval implementation of the elastic CPU limiter and trace ExportRequests issued by backup and fingerprinting. Review the existing observability metrics and pre-emption path; done means measurements report ExportRequests pre-empted and keys processed before pre-emption.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
databases, observability
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.