Skip to content

Commit

Permalink
chore(dashboard): AAS reformulation in RDS instance
Browse files Browse the repository at this point in the history
  • Loading branch information
vmercierfr committed May 28, 2024
1 parent b8c1dae commit 8c54a8b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions configs/grafana/panels/instance.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -141,18 +141,18 @@ local colors = common.colors;
+ standardOptions.withNoValue('Disabled'),

activeQueries:
ts.base('Active queries vs vCPU', 'Number of active queries waiting for CPU and non CPU wait. For optimal performances, you should not have more CPU wait that number of CPU', [queries.instance.cpu.wait, queries.instance.cpu.nonWait, queries.instance.cpu.count])
ts.base('Average Active Sessions', "A session is active when it's either running on CPU or waiting for a resource to become available so that it can proceed (e.g. IOPS or CPU). For optimal performances, you should not have more AAS than the total number of vCPU. Investigate AAS in RDS performance insights. See also https://www.kylehailey.com/post/setting-the-record-straight-a-comprehensive-guide-to-understanding-the-aas-metric-in-databases and https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PerfInsights.Overview.ActiveSessions.html", [queries.instance.cpu.wait, queries.instance.cpu.nonWait, queries.instance.cpu.count])
+ standardOptions.withDecimals(1)
+ custom.stacking.withMode('normal')
+ standardOptions.withOverrides([
fieldOverride.byName.new('Number of vCPU')
+ ts.max,
fieldOverride.byName.new('CPU wait')
fieldOverride.byName.new('CPU execution')
+ standardOptions.override.byType.withPropertiesFromOptions(
color.withMode('fixed')
+ color.withFixedColor(colors.ok)
),
fieldOverride.byName.new('Non CPU wait')
fieldOverride.byName.new('Non CPU execution')
+ standardOptions.override.byType.withPropertiesFromOptions(
color.withMode('fixed')
+ color.withFixedColor(colors.warning)
Expand Down
12 changes: 6 additions & 6 deletions configs/grafana/public/rds-instance.json
Original file line number Diff line number Diff line change
Expand Up @@ -1254,7 +1254,7 @@
"type": "datasource",
"uid": "-- Mixed --"
},
"description": "Number of active queries waiting for CPU and non CPU wait. For optimal performances, you should not have more CPU wait that number of CPU",
"description": "A session is active when it's either running on CPU or waiting for a resource to become available so that it can proceed (e.g. IOPS or CPU). For optimal performances, you should not have more AAS than the total number of vCPU. Investigate AAS in RDS performance insights. See also https://www.kylehailey.com/post/setting-the-record-straight-a-comprehensive-guide-to-understanding-the-aas-metric-in-databases and https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PerfInsights.Overview.ActiveSessions.html",
"fieldConfig": {
"defaults": {
"custom": {
Expand Down Expand Up @@ -1301,7 +1301,7 @@
{
"matcher": {
"id": "byName",
"options": "CPU wait"
"options": "CPU execution"
},
"properties": [
{
Expand All @@ -1316,7 +1316,7 @@
{
"matcher": {
"id": "byName",
"options": "Non CPU wait"
"options": "Non CPU execution"
},
"properties": [
{
Expand Down Expand Up @@ -1356,15 +1356,15 @@
"uid": "$datasource"
},
"expr": "max(rds_dbload_cpu_average{aws_account_id=\"$aws_account_id\",aws_region=\"$aws_region\",dbidentifier=\"$dbidentifier\"})\n",
"legendFormat": "CPU wait"
"legendFormat": "CPU execution"
},
{
"datasource": {
"type": "prometheus",
"uid": "$datasource"
},
"expr": "max(rds_dbload_noncpu_average{aws_account_id=\"$aws_account_id\",aws_region=\"$aws_region\",dbidentifier=\"$dbidentifier\"})\n",
"legendFormat": "Non CPU wait"
"legendFormat": "Non CPU execution"
},
{
"datasource": {
Expand All @@ -1375,7 +1375,7 @@
"legendFormat": "Number of vCPU"
}
],
"title": "Active queries vs vCPU",
"title": "Average Active Sessions",
"type": "timeseries"
},
{
Expand Down
4 changes: 2 additions & 2 deletions configs/grafana/queries/instance.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,15 @@ local variables = import '../variables.libsonnet';
max(rds_dbload_cpu_average{aws_account_id="$aws_account_id",aws_region="$aws_region",dbidentifier="$dbidentifier"})
|||
)
+ prometheusQuery.withLegendFormat('CPU wait'),
+ prometheusQuery.withLegendFormat('CPU execution'),
nonWait:
prometheusQuery.new(
'$' + variables.datasource.name,
|||
max(rds_dbload_noncpu_average{aws_account_id="$aws_account_id",aws_region="$aws_region",dbidentifier="$dbidentifier"})
|||
)
+ prometheusQuery.withLegendFormat('Non CPU wait'),
+ prometheusQuery.withLegendFormat('Non CPU execution'),
},
storage: {
allocated:
Expand Down

0 comments on commit 8c54a8b

Please sign in to comment.