Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dashboards: add replica cpu to repl dashboard #98270

Merged
merged 3 commits into from
Mar 9, 2023

Conversation

kvoli
Copy link
Collaborator

@kvoli kvoli commented Mar 9, 2023

In #96127 we added the option to load balance replica CPU instead of QPS across
stores in a cluster. It is desirable to view the signal being controlled for
rebalancing in the replication dashboard, similar to QPS.

This pr adds the rebalancing.cpunanospersecond metric to the replication
metrics dashboard.

The avg QPS graph on the replication graph previously described the metric as
"Exponentially weighted average", however this is not true.

This pr updates the description to just be "moving average" which is accurate.
Note that follow the workload does use an exponentially weighted value, however
the metric in the dashboard is not the same.

This pr also updates the graph header to include Replica in the title: "Average
Replica Queries per Node". QPS is specific to replicas. This is already
mentioned in the description.

Resolves: #98109

@kvoli kvoli self-assigned this Mar 9, 2023
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@kvoli kvoli requested review from andrewbaptist and removed request for andrewbaptist March 9, 2023 00:54
@kvoli kvoli force-pushed the 230308.rebalancing-cpu-dash branch 3 times, most recently from 5e1d842 to 30b6da5 Compare March 9, 2023 17:57
@kvoli kvoli requested a review from andrewbaptist March 9, 2023 17:58
@kvoli kvoli marked this pull request as ready for review March 9, 2023 17:59
@kvoli kvoli requested a review from a team March 9, 2023 17:59
@kvoli kvoli force-pushed the 230308.rebalancing-cpu-dash branch 2 times, most recently from c43d154 to e144cb7 Compare March 9, 2023 21:07
@kvoli kvoli requested a review from a team March 9, 2023 21:17
Copy link
Member

@xinhaoz xinhaoz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with the map swap.

rebalancing decisions.`}
>
<Axis units={AxisUnits.Duration} label="CPU time">
{_.map(nodeIDs, nid => (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: prefer native array map over lodash's map

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to use native map. I also pushed a preceding commit that replaces _.map with the native array map for the other graphs in replication.tsx.

@kvoli kvoli force-pushed the 230308.rebalancing-cpu-dash branch from e144cb7 to 972570a Compare March 9, 2023 21:24
kvoli added 3 commits March 9, 2023 21:34
This commit updates the replication dashboard to use the native
javascript array map function, instead of lodash map.

Release note: None
The avg QPS graph on the replication graph previously described the
metric as "Exponentially weighted average", however this is not true.

This commit updates the description to just be "moving average" which is
accurate. Note that follow the workload does use an exponentially
weighted value, however the metric in the dashboard is not the same.

This commit also updates the graph header to include Replica in the
title: "Average Replica Queries per Node". QPS is specific to
replicas. This is already mentioned in the description.

Release note (ui change): The description of the average QPS graph in the
replication metrics dashboard no longer claims the average is
exponentially weighted.
In cockroachdb#96127 we added the option to load balance replica CPU instead of QPS
across stores in a cluster. It is desirable to view the signal being
controlled for rebalancing in the replication dashboard, similar to QPS.

This commit adds the `rebalancing.cpunanospersecond` metric to the
replication metrics dashboard.

Resolves: cockroachdb#98109

Release note (ui change): `rebalancing.cpunanospersecond` is now
included in the replication metrics dashboard.
@kvoli kvoli force-pushed the 230308.rebalancing-cpu-dash branch from 972570a to 646d5e6 Compare March 9, 2023 21:34
@kvoli
Copy link
Collaborator Author

kvoli commented Mar 9, 2023

TYFTR

bors r=xinhaoz

@craig
Copy link
Contributor

craig bot commented Mar 9, 2023

Build succeeded:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dbconsole: include rebalancing.cpupersecond graph in the replication dashboard
3 participants