-
Notifications
You must be signed in to change notification settings - Fork 4.1k
admission: export elastic CPU utilization % as a metric, natively #89814
Copy link
Copy link
Closed
Labels
C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
Description
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.
+cc @cockroachdb/admission-control.
Jira issue: CRDB-20453
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
