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

resource_control: add new grafana panel for background task utilization #56285

Merged
merged 1 commit into from
Sep 26, 2024
Merged
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
171 changes: 143 additions & 28 deletions pkg/metrics/grafana/tidb_resource_control.json
Original file line number Diff line number Diff line change
Expand Up @@ -2992,7 +2992,7 @@
"h": 1,
"w": 24,
"x": 0,
"y": 40
"y": 4
},
"id": 23763573632,
"panels": [
Expand All @@ -3001,21 +3001,22 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": {
"type": "prometheus",
"uid": "${DS_TEST-CLUSTER}"
},
"datasource": "${DS_TEST-CLUSTER}",
"description": "The total background task's request unit cost for all resource groups.",
"editable": true,
"error": false,
"fieldConfig": {
"defaults": {},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"grid": {},
"gridPos": {
"h": 9,
"w": 12,
"x": 0,
"y": 46
"y": 5
},
"hiddenSeries": false,
"id": 23763573842,
Expand All @@ -3038,7 +3039,7 @@
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "7.5.11",
"pluginVersion": "7.5.17",
"pointradius": 5,
"points": false,
"renderer": "flot",
Expand Down Expand Up @@ -3076,7 +3077,9 @@
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Background Tasks' RU",
"tooltip": {
"msResolution": true,
Expand All @@ -3086,20 +3089,20 @@
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"$$hashKey": "object:546",
"format": "short",
"logBase": 10,
"min": "0",
"show": true
},
{
"$$hashKey": "object:547",
"format": "short",
"logBase": 1,
"show": true
Expand All @@ -3116,6 +3119,7 @@
"dashes": false,
"datasource": "${DS_TEST-CLUSTER}",
"decimals": 1,
"description": "The resource(CPU, IO) utilization percentage and limit of background tasks",
"editable": true,
"error": false,
"fieldConfig": {
Expand All @@ -3129,7 +3133,7 @@
"h": 9,
"w": 12,
"x": 12,
"y": 46
"y": 5
},
"hiddenSeries": false,
"id": 23763573753,
Expand All @@ -3155,7 +3159,7 @@
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "7.5.11",
"pluginVersion": "7.5.17",
"pointradius": 5,
"points": false,
"renderer": "flot",
Expand All @@ -3167,11 +3171,11 @@
"targets": [
{
"exemplar": true,
"expr": "tikv_resource_control_background_quota_limiter{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$tikv_instance\", type=\"cpu\"}",
"expr": "tikv_resource_control_bg_resource_utilization{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$tikv_instance\"}",
"format": "time_series",
"interval": "",
"intervalFactor": 2,
"legendFormat": "{{resource_group}}-{{instance}}",
"legendFormat": "{{instance}}-{{type}}",
"metric": "scan_details",
"refId": "B",
"step": 4
Expand All @@ -3181,7 +3185,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Background Task CPU Limit",
"title": "Background Task Resource Utilization",
"tooltip": {
"msResolution": false,
"shared": true,
Expand All @@ -3199,7 +3203,7 @@
"yaxes": [
{
"decimals": 1,
"format": "µs",
"format": "percent",
"label": null,
"logBase": 1,
"max": null,
Expand Down Expand Up @@ -3240,10 +3244,10 @@
"h": 9,
"w": 12,
"x": 0,
"y": 55
"y": 14
},
"hiddenSeries": false,
"id": 23763573840,
"id": 23763573843,
"legend": {
"alignAsTable": true,
"avg": false,
Expand All @@ -3266,7 +3270,7 @@
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "7.5.11",
"pluginVersion": "7.5.17",
"pointradius": 5,
"points": false,
"renderer": "flot",
Expand All @@ -3278,7 +3282,7 @@
"targets": [
{
"exemplar": true,
"expr": "tikv_resource_control_background_quota_limiter{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$tikv_instance\", type=\"io\"}",
"expr": "tikv_resource_control_background_quota_limiter{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$tikv_instance\", type=\"cpu\"}",
"format": "time_series",
"interval": "",
"intervalFactor": 2,
Expand All @@ -3292,7 +3296,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Background Task IO Limit",
"title": "Background Task CPU Limit",
"tooltip": {
"msResolution": false,
"shared": true,
Expand All @@ -3310,7 +3314,7 @@
"yaxes": [
{
"decimals": 1,
"format": "bytes",
"format": "µs",
"label": null,
"logBase": 1,
"max": null,
Expand Down Expand Up @@ -3351,7 +3355,7 @@
"h": 9,
"w": 12,
"x": 12,
"y": 55
"y": 14
},
"hiddenSeries": false,
"id": 23763573754,
Expand All @@ -3377,7 +3381,7 @@
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "7.5.11",
"pluginVersion": "7.5.17",
"pointradius": 5,
"points": false,
"renderer": "flot",
Expand Down Expand Up @@ -3462,7 +3466,118 @@
"h": 9,
"w": 12,
"x": 0,
"y": 64
"y": 23
},
"hiddenSeries": false,
"id": 23763573840,
"legend": {
"alignAsTable": true,
"avg": false,
"current": true,
"max": true,
"min": false,
"rightSide": true,
"show": true,
"sideWidth": null,
"sort": "current",
"sortDesc": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 1,
"links": [],
"nullPointMode": "null",
"options": {
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "7.5.17",
"pointradius": 5,
"points": false,
"renderer": "flot",
"repeatDirection": "h",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"exemplar": true,
"expr": "tikv_resource_control_background_quota_limiter{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$tikv_instance\", type=\"io\"}",
"format": "time_series",
"interval": "",
"intervalFactor": 2,
"legendFormat": "{{resource_group}}-{{instance}}",
"metric": "scan_details",
"refId": "B",
"step": 4
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Background Task IO Limit",
"tooltip": {
"msResolution": false,
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"decimals": 1,
"format": "bytes",
"label": null,
"logBase": 1,
"max": null,
"min": "0",
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": false
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_TEST-CLUSTER}",
"decimals": 1,
"editable": true,
"error": false,
"fieldConfig": {
"defaults": {},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"grid": {},
"gridPos": {
"h": 9,
"w": 12,
"x": 12,
"y": 23
},
"hiddenSeries": false,
"id": 23763573841,
Expand All @@ -3488,7 +3603,7 @@
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "7.5.11",
"pluginVersion": "7.5.17",
"pointradius": 5,
"points": false,
"renderer": "flot",
Expand Down Expand Up @@ -3572,8 +3687,8 @@
"gridPos": {
"h": 9,
"w": 12,
"x": 12,
"y": 64
"x": 0,
"y": 32
},
"hiddenSeries": false,
"id": 23763573755,
Expand All @@ -3599,7 +3714,7 @@
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "7.5.11",
"pluginVersion": "7.5.17",
"pointradius": 5,
"points": false,
"renderer": "flot",
Expand Down