Skip to content

Use max instead of avg to aggregate node CPUs

Matthias Käppler requested to merge mk/max-over-cpus into master

What does this MR do?

For Usage Ping, we currently collect all sorts of topology related data, including data about the physical nodes running GitLab on-premises. One such data point is the number of CPUs each node has.

We currently collect this data using Prometheus recording rules, then (because Usage Ping only runs once a week), fetch this data using some form of weekly aggregation. So far we've always pulled averages, since that makes sense for most of the data. For discrete values such as CPU cores, however, averages can be confusing since you might get fractional or odd values.

This MR adds support for aggregating via max_over_time instead of just avg_over_time, which should help get more sensible numbers for CPUs. We use max because it is more likely that a node that is swapped out over the course of 7 days is upgraded rather than downgraded.

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Edited by Matthias Käppler

Merge request reports