From 608058de11099d4b6ad57c2a7ccebf9e58fdfe88 Mon Sep 17 00:00:00 2001 From: Vincent Mercier Date: Tue, 28 May 2024 17:23:00 +0200 Subject: [PATCH] chore(dashboard): AAS reformulation in RDS instance Signed-off-by: Vincent Mercier --- configs/grafana/panels/instance.libsonnet | 6 +++--- configs/grafana/public/rds-instance.json | 12 ++++++------ configs/grafana/queries/instance.libsonnet | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/configs/grafana/panels/instance.libsonnet b/configs/grafana/panels/instance.libsonnet index 004dd4e..efa68fa 100644 --- a/configs/grafana/panels/instance.libsonnet +++ b/configs/grafana/panels/instance.libsonnet @@ -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) diff --git a/configs/grafana/public/rds-instance.json b/configs/grafana/public/rds-instance.json index 980f859..ce7e077 100644 --- a/configs/grafana/public/rds-instance.json +++ b/configs/grafana/public/rds-instance.json @@ -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": { @@ -1301,7 +1301,7 @@ { "matcher": { "id": "byName", - "options": "CPU wait" + "options": "CPU execution" }, "properties": [ { @@ -1316,7 +1316,7 @@ { "matcher": { "id": "byName", - "options": "Non CPU wait" + "options": "Non CPU execution" }, "properties": [ { @@ -1356,7 +1356,7 @@ "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": { @@ -1364,7 +1364,7 @@ "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": { @@ -1375,7 +1375,7 @@ "legendFormat": "Number of vCPU" } ], - "title": "Active queries vs vCPU", + "title": "Average Active Sessions", "type": "timeseries" }, { diff --git a/configs/grafana/queries/instance.libsonnet b/configs/grafana/queries/instance.libsonnet index a059ba3..39f3d9e 100644 --- a/configs/grafana/queries/instance.libsonnet +++ b/configs/grafana/queries/instance.libsonnet @@ -81,7 +81,7 @@ 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, @@ -89,7 +89,7 @@ local variables = import '../variables.libsonnet'; 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: