Skip to content

admission: export elastic CPU utilization % as a metric, natively #89814

@irfansharif

Description

@irfansharif

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

With the elastic CPU limiter (#86638) closely tracking acquired/returned CPU nanoseconds, it's possible to compute what % CPU utilization it's nominally overseeing. In experimentation we've been using prometheus/grafana (https://gist.github.com/irfansharif/3174555485931f8ae6e723ab9f2d3573 for ex.) where this CPU % is being computed using:

(rate(admission_elastic_cpu_acquired_nanos[$__rate_interval]) - rate(admission_elastic_cpu_acquired_nanos[$__rate_interval])) / admission_elastic_cpu_max_available_nanos

This timeseries math is not possible in CRDB natively. But it's a useful one to export directly to observe the limiter in action. We could compute this similarly within CRDB and export as a metric.

image

+cc @cockroachdb/admission-control.

Jira issue: CRDB-20453

Metadata

Metadata

Assignees

Labels

C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions