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

ui: timeseries: add per-node CPU and memory usage charts #23733

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,62 @@ export default function (props: GraphDashboardProps) {
</LineGraph>,

<LineGraph
title="Memory Usage"
title="CPU Time (per-node)"
Copy link
Contributor

Choose a reason for hiding this comment

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

Why'd you swap the charts?

sources={nodeSources}
tooltip={`CPU usage per node, in CPU seconds per second. E.g. if a node has four
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems like we should either sum the user and system time or specifically call out that this is just user time. I think I prefer that we sum them, since system time is nontrivial.

cores all at 100%, the value will be 4.`}
>
<Axis units={AxisUnits.Count} label="cpu seconds / second">
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd recommend that we keep the units consistent between the two CPU charts.

{
_.map(nodeIDs, (nid) => {
return (
<Metric
name="cr.node.sys.cpu.user.percent"
title={nodeDisplayName(nodesSummary, nid)}
sources={[nid]}
/>
);
})
}
</Axis>
</LineGraph>,

<LineGraph
title="CPU Time (aggregated)"
sources={nodeSources}
tooltip={
`The amount of CPU time used by CockroachDB (User)
and system-level operations (Sys) ${tooltipSelection}.`
}
>
<Axis units={AxisUnits.Duration} label="cpu time">
<Metric name="cr.node.sys.cpu.user.ns" title="User CPU Time" nonNegativeRate />
<Metric name="cr.node.sys.cpu.sys.ns" title="Sys CPU Time" nonNegativeRate />
</Axis>
</LineGraph>,

<LineGraph
title="Memory Usage (per-node RSS)"
sources={nodeSources}
tooltip={`Per-node Resident Set Size.`}
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we've explained what RSS means anywhere else, including the aggregated Memory Usage chart where RSS is just referred to as "Total Memory".

I think (per-node Total Memory) is fine for the title, while the tooltip could be Total Memory used by the CockroachDB process on each node."

>
<Axis units={AxisUnits.Bytes} label="memory usage">
{
_.map(nodeIDs, (nid) => {
return (
<Metric
name="cr.node.sys.rss"
title={nodeDisplayName(nodesSummary, nid)}
sources={[nid]}
/>
);
})
}
</Axis>
</LineGraph>,

<LineGraph
title="Memory Usage (aggregated)"
sources={nodeSources}
tooltip={(
<div>
Expand Down Expand Up @@ -87,20 +142,6 @@ export default function (props: GraphDashboardProps) {
</Axis>
</LineGraph>,

<LineGraph
title="CPU Time"
sources={nodeSources}
tooltip={
`The amount of CPU time used by CockroachDB (User)
and system-level operations (Sys) ${tooltipSelection}.`
}
>
<Axis units={AxisUnits.Duration} label="cpu time">
<Metric name="cr.node.sys.cpu.user.ns" title="User CPU Time" nonNegativeRate />
<Metric name="cr.node.sys.cpu.sys.ns" title="Sys CPU Time" nonNegativeRate />
</Axis>
</LineGraph>,

<LineGraph
title="Clock Offset"
sources={nodeSources}
Expand Down