cockroachdb / cockroach

CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement.
https://www.cockroachlabs.com
Other
29.84k stars 3.77k forks source link

DB Console: Improve CPU vs Host CPU graphs tooltips #107819

Open gtr opened 1 year ago

gtr commented 1 year ago

The tooltips in the Metrics page for the CPU and Host CPU graphs are confusing.

Currently, the CPU graph's tooltip says "CPU usage for the CRDB nodes across all nodes". The documentation for the sys.cpu.combined.percent-normalized metric which populates this graph states "Current user+system cpu percentage, normalized 0-1 by number of cores". This does not match the tooltip.

The Host CPU graph tooltips says "Machine-wide CPU usage across all nodes" which is also not descriptive. What are "machines" in this context? There is also no documentation for the sys.cpu.host.combined.percent-normalized metric which populates this graph.

We would like to agree on a definition for both the metrics in question and eventually align them with the corresponding tooltips in the DB Console.

Jira issue: CRDB-30204

Epic CRDB-32130

florence-crl commented 1 year ago

see this slack thread for context.

Agreed upon definitions: sys.cpu.combined.percent-normalized: Current user+system cpu percentage consumed by the CRDB process, normalized by number of cores. sys.cpu.host.combined.percent-normalized: Current user+system cpu percentage consumed by all processes on the host OS, normalized by number of cores. If the CRDB process is run in a containerized environment, the host OS is the container since the CRDB process cannot inspect CPU usage beyond the container.

abarganier commented 1 year ago

NOTE: Let's be sure https://github.com/cockroachdb/cockroach/issues/108291 is handled as well as part of this effort.