From afe8bdbfa27fd1a571d6cd1cdcef3b5b7e28b5e4 Mon Sep 17 00:00:00 2001 From: tiancaiamao Date: Tue, 17 May 2022 11:02:49 +0800 Subject: [PATCH 1/3] metrics: add cached table related metrics to grafana panel --- metrics/grafana/tidb.json | 643 +++++++++++++++++++++++++++++++++----- 1 file changed, 559 insertions(+), 84 deletions(-) diff --git a/metrics/grafana/tidb.json b/metrics/grafana/tidb.json index ff88b30483d2e..2602ce0741055 100644 --- a/metrics/grafana/tidb.json +++ b/metrics/grafana/tidb.json @@ -14,7 +14,7 @@ "type": "grafana", "id": "grafana", "name": "Grafana", - "version": "6.4.5" + "version": "7.5.11" }, { "type": "panel", @@ -51,12 +51,13 @@ "editable": true, "gnetId": null, "graphTooltip": 1, - "id": 28, - "iteration": 1617019008967, + "id": null, + "iteration": 1652755916281, "links": [], "panels": [ { "collapsed": true, + "datasource": null, "gridPos": { "h": 1, "w": 24, @@ -1175,6 +1176,7 @@ }, { "collapsed": true, + "datasource": null, "gridPos": { "h": 1, "w": 24, @@ -1751,6 +1753,7 @@ }, { "collapsed": true, + "datasource": null, "gridPos": { "h": 1, "w": 24, @@ -1769,7 +1772,12 @@ "description": "TiDB uptime since last restart", "editable": true, "error": false, + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, "fill": 1, + "fillGradient": 0, "grid": {}, "gridPos": { "h": 7, @@ -1777,6 +1785,7 @@ "x": 0, "y": 3 }, + "hiddenSeries": false, "id": 184, "legend": { "alignAsTable": true, @@ -1793,8 +1802,11 @@ "linewidth": 1, "links": [], "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, "percentage": false, - "pluginVersion": "6.1.6", + "pluginVersion": "7.5.11", "pointradius": 5, "points": false, "renderer": "flot", @@ -1870,7 +1882,12 @@ "description": "TiDB process rss memory usage. TiDB heap memory size in use ", "editable": true, "error": false, + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, "fill": 0, + "fillGradient": 0, "grid": {}, "gridPos": { "h": 7, @@ -1878,6 +1895,7 @@ "x": 12, "y": 3 }, + "hiddenSeries": false, "id": 3, "legend": { "alignAsTable": true, @@ -1897,7 +1915,11 @@ "linewidth": 1, "links": [], "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, "percentage": false, + "pluginVersion": "7.5.11", "pointradius": 5, "points": false, "renderer": "flot", @@ -2017,7 +2039,12 @@ "description": "TiDB cpu usage calculated with process cpu running seconds", "editable": true, "error": false, + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, "fill": 1, + "fillGradient": 0, "grid": {}, "gridPos": { "h": 7, @@ -2025,6 +2052,7 @@ "x": 0, "y": 10 }, + "hiddenSeries": false, "id": 168, "legend": { "alignAsTable": true, @@ -2041,7 +2069,11 @@ "linewidth": 1, "links": [], "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, "percentage": false, + "pluginVersion": "7.5.11", "pointradius": 5, "points": false, "renderer": "flot", @@ -2128,7 +2160,12 @@ "description": "TiDB current connection counts", "editable": true, "error": false, + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, "fill": 1, + "fillGradient": 0, "grid": {}, "gridPos": { "h": 7, @@ -2136,6 +2173,7 @@ "x": 12, "y": 10 }, + "hiddenSeries": false, "id": 8, "legend": { "alignAsTable": true, @@ -2152,7 +2190,11 @@ "linewidth": 1, "links": [], "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, "percentage": false, + "pluginVersion": "7.5.11", "pointradius": 5, "points": false, "renderer": "flot", @@ -2233,13 +2275,19 @@ "dashes": false, "datasource": "${DS_TEST-CLUSTER}", "description": "TiDB process opened file descriptors count", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, "fill": 1, + "fillGradient": 0, "gridPos": { "h": 7, "w": 12, "x": 0, "y": 17 }, + "hiddenSeries": false, "id": 188, "legend": { "alignAsTable": true, @@ -2256,7 +2304,11 @@ "linewidth": 1, "links": [], "nullPointMode": "null", + "options": { + "alertThreshold": true + }, "percentage": false, + "pluginVersion": "7.5.11", "pointradius": 5, "points": false, "renderer": "flot", @@ -2323,7 +2375,12 @@ "description": "TiDB connection disconnected counts", "editable": true, "error": false, + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, "fill": 1, + "fillGradient": 0, "grid": {}, "gridPos": { "h": 7, @@ -2331,6 +2388,7 @@ "x": 12, "y": 17 }, + "hiddenSeries": false, "id": 205, "legend": { "alignAsTable": true, @@ -2347,7 +2405,11 @@ "linewidth": 1, "links": [], "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, "percentage": false, + "pluginVersion": "7.5.11", "pointradius": 5, "points": false, "renderer": "flot", @@ -2419,31 +2481,41 @@ "dashLength": 10, "dashes": false, "datasource": "${DS_TEST-CLUSTER}", - "description": "TiDB process current goroutines count", + "description": "TiDB Server critical events total, including start/close/shutdown/hang etc", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, "fill": 1, + "fillGradient": 0, "gridPos": { "h": 7, "w": 12, - "x": 12, + "x": 0, "y": 24 }, - "id": 61, + "hiddenSeries": false, + "id": 49, "legend": { "alignAsTable": true, "avg": false, - "current": true, - "max": true, + "current": false, + "max": false, "min": false, "rightSide": true, "show": true, "total": false, - "values": true + "values": false }, "lines": true, "linewidth": 1, "links": [], "nullPointMode": "null", + "options": { + "alertThreshold": true + }, "percentage": false, + "pluginVersion": "7.5.11", "pointradius": 5, "points": false, "renderer": "flot", @@ -2453,10 +2525,10 @@ "steppedLine": false, "targets": [ { - "expr": " go_goroutines{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$instance\", job=~\"tidb.*\"}", + "expr": "increase(tidb_server_event_total{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$instance\"}[10m])", "format": "time_series", "intervalFactor": 2, - "legendFormat": "{{instance}}", + "legendFormat": "{{instance}}-server {{type}}", "refId": "A" } ], @@ -2464,7 +2536,7 @@ "timeFrom": null, "timeRegions": [], "timeShift": null, - "title": "Goroutine Count", + "title": "Events OPM", "tooltip": { "shared": true, "sort": 0, @@ -2507,31 +2579,41 @@ "dashLength": 10, "dashes": false, "datasource": "${DS_TEST-CLUSTER}", - "description": "TiDB Server critical events total, including start/close/shutdown/hang etc", + "description": "TiDB process current goroutines count", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, "fill": 1, + "fillGradient": 0, "gridPos": { "h": 7, "w": 12, - "x": 0, - "y": 38 + "x": 12, + "y": 24 }, - "id": 49, + "hiddenSeries": false, + "id": 61, "legend": { "alignAsTable": true, "avg": false, - "current": false, - "max": false, + "current": true, + "max": true, "min": false, "rightSide": true, "show": true, "total": false, - "values": false + "values": true }, "lines": true, "linewidth": 1, "links": [], "nullPointMode": "null", + "options": { + "alertThreshold": true + }, "percentage": false, + "pluginVersion": "7.5.11", "pointradius": 5, "points": false, "renderer": "flot", @@ -2541,10 +2623,10 @@ "steppedLine": false, "targets": [ { - "expr": "increase(tidb_server_event_total{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$instance\"}[10m])", + "expr": " go_goroutines{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$instance\", job=~\"tidb.*\"}", "format": "time_series", "intervalFactor": 2, - "legendFormat": "{{instance}}-server {{type}}", + "legendFormat": "{{instance}}", "refId": "A" } ], @@ -2552,7 +2634,7 @@ "timeFrom": null, "timeRegions": [], "timeShift": null, - "title": "Events OPM", + "title": "Goroutine Count", "tooltip": { "shared": true, "sort": 0, @@ -2598,14 +2680,20 @@ "description": "TiDB instance prepare statements count", "editable": true, "error": false, + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, "fill": 1, + "fillGradient": 0, "grid": {}, "gridPos": { "h": 7, "w": 12, "x": 0, - "y": 45 + "y": 31 }, + "hiddenSeries": false, "id": 165, "legend": { "alignAsTable": true, @@ -2622,7 +2710,11 @@ "linewidth": 1, "links": [], "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, "percentage": false, + "pluginVersion": "7.5.11", "pointradius": 5, "points": false, "renderer": "flot", @@ -2703,13 +2795,19 @@ "dashes": false, "datasource": "${DS_TEST-CLUSTER}", "description": "TiDB instance monitor average keep alive times", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, "fill": 1, + "fillGradient": 0, "gridPos": { "h": 7, "w": 12, "x": 12, - "y": 45 + "y": 31 }, + "hiddenSeries": false, "id": 82, "legend": { "alignAsTable": true, @@ -2726,7 +2824,11 @@ "linewidth": 1, "links": [], "nullPointMode": "null", + "options": { + "alertThreshold": true + }, "percentage": false, + "pluginVersion": "7.5.11", "pointradius": 5, "points": false, "renderer": "flot", @@ -2791,13 +2893,19 @@ "dashes": false, "datasource": "${DS_TEST-CLUSTER}", "description": "TiDB instance critical errors count including panic etc", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, "fill": 1, + "fillGradient": 0, "gridPos": { "h": 7, "w": 12, "x": 0, - "y": 52 + "y": 38 }, + "hiddenSeries": false, "id": 54, "legend": { "alignAsTable": true, @@ -2814,7 +2922,11 @@ "linewidth": 1, "links": [], "nullPointMode": "null", + "options": { + "alertThreshold": true + }, "percentage": false, + "pluginVersion": "7.5.11", "pointradius": 5, "points": false, "renderer": "flot", @@ -2888,13 +3000,19 @@ "dashes": false, "datasource": "${DS_TEST-CLUSTER}", "description": "TiDB monitor time jump back count", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, "fill": 1, + "fillGradient": 0, "gridPos": { "h": 7, "w": 12, "x": 12, - "y": 52 + "y": 38 }, + "hiddenSeries": false, "id": 166, "legend": { "alignAsTable": true, @@ -2911,7 +3029,11 @@ "linewidth": 1, "links": [], "nullPointMode": "null", + "options": { + "alertThreshold": true + }, "percentage": false, + "pluginVersion": "7.5.11", "pointradius": 5, "points": false, "renderer": "flot", @@ -2976,12 +3098,16 @@ "dashes": false, "datasource": "${DS_TEST-CLUSTER}", "description": "Duration (us) for getting token, it should be small until concurrency limit is reached.", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, "fill": 1, "gridPos": { "h": 7, "w": 12, "x": 0, - "y": 59 + "y": 45 }, "id": 111, "legend": { @@ -2998,6 +3124,7 @@ "links": [], "nullPointMode": "null", "percentage": false, + "pluginVersion": "7.5.11", "pointradius": 5, "points": false, "renderer": "flot", @@ -3062,12 +3189,16 @@ "dashes": false, "datasource": "${DS_TEST-CLUSTER}", "description": "TiDB instance critical errors count including panic etc", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, "fill": 1, "gridPos": { "h": 7, "w": 12, "x": 12, - "y": 59 + "y": 45 }, "id": 191, "legend": { @@ -3086,6 +3217,7 @@ "links": [], "nullPointMode": "null", "percentage": false, + "pluginVersion": "7.5.11", "pointradius": 5, "points": false, "renderer": "flot", @@ -3151,12 +3283,16 @@ "dashes": false, "datasource": "${DS_TEST-CLUSTER}", "description": "Data traffic statistics between TiDB and the client.", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, "fill": 1, "gridPos": { "h": 7, "w": 12, "x": 0, - "y": 66 + "y": 52 }, "id": 211, "legend": { @@ -3173,6 +3309,7 @@ "links": [], "nullPointMode": "null", "percentage": false, + "pluginVersion": "7.5.11", "pointradius": 5, "points": false, "renderer": "flot", @@ -3249,12 +3386,16 @@ "dashes": false, "datasource": "${DS_TEST-CLUSTER}", "description": "TiDB processing handshake error count", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, "fill": 1, "gridPos": { "h": 7, "w": 12, "x": 12, - "y": 66 + "y": 52 }, "id": 167, "legend": { @@ -3273,6 +3414,7 @@ "links": [], "nullPointMode": "null", "percentage": false, + "pluginVersion": "7.5.11", "pointradius": 5, "points": false, "renderer": "flot", @@ -3337,11 +3479,12 @@ }, { "collapsed": true, + "datasource": null, "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 4 + "y": 3 }, "id": 141, "panels": [ @@ -5583,11 +5726,12 @@ }, { "collapsed": true, + "datasource": null, "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 5 + "y": 4 }, "id": 142, "panels": [ @@ -5601,14 +5745,20 @@ "description": "The time cost of parsing SQL to AST", "editable": true, "error": false, + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, "fill": 1, + "fillGradient": 0, "grid": {}, "gridPos": { "h": 8, "w": 12, "x": 0, - "y": 82 + "y": 5 }, + "hiddenSeries": false, "id": 156, "interval": "", "legend": { @@ -5630,7 +5780,11 @@ "linewidth": 1, "links": [], "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, "percentage": false, + "pluginVersion": "7.5.11", "pointradius": 5, "points": false, "renderer": "flot", @@ -5702,14 +5856,20 @@ "description": "The time cost of building the query plan", "editable": true, "error": false, + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, "fill": 1, + "fillGradient": 0, "grid": {}, "gridPos": { "h": 8, "w": 12, "x": 12, - "y": 82 + "y": 5 }, + "hiddenSeries": false, "id": 154, "interval": "", "legend": { @@ -5731,7 +5891,11 @@ "linewidth": 1, "links": [], "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, "percentage": false, + "pluginVersion": "7.5.11", "pointradius": 5, "points": false, "renderer": "flot", @@ -5803,16 +5967,132 @@ "description": "The time cost of executing the SQL which does not include the time to get the results of the query .", "editable": true, "error": false, + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "grid": {}, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 13 + }, + "hiddenSeries": false, + "id": 169, + "interval": "", + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": true, + "min": false, + "rightSide": true, + "show": true, + "sort": null, + "sortDesc": null, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.11", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "histogram_quantile(0.95, sum(rate(tidb_session_execute_duration_seconds_bucket{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$instance\"}[1m])) by (le, sql_type))", + "format": "time_series", + "instant": false, + "intervalFactor": 2, + "legendFormat": "{{sql_type}}", + "refId": "A", + "step": 30 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Execution Duration", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": null, + "format": "s", + "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": null, + "description": "TiDB executors using more cpu and memory resources", + "editable": true, + "error": false, + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, "fill": 1, + "fillGradient": 0, "grid": {}, "gridPos": { "h": 8, "w": 12, - "x": 0, - "y": 90 + "x": 12, + "y": 13 }, - "id": 169, - "interval": "", + "hiddenSeries": false, + "id": 76, "legend": { "alignAsTable": true, "avg": true, @@ -5832,7 +6112,11 @@ "linewidth": 1, "links": [], "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, "percentage": false, + "pluginVersion": "7.5.11", "pointradius": 5, "points": false, "renderer": "flot", @@ -5842,11 +6126,10 @@ "steppedLine": false, "targets": [ { - "expr": "histogram_quantile(0.95, sum(rate(tidb_session_execute_duration_seconds_bucket{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$instance\"}[1m])) by (le, sql_type))", + "expr": "sum(rate(tidb_executor_expensive_total{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$instance\"}[1m])) by (type)", "format": "time_series", - "instant": false, "intervalFactor": 2, - "legendFormat": "{{sql_type}}", + "legendFormat": "{{type}}", "refId": "A", "step": 30 } @@ -5855,7 +6138,7 @@ "timeFrom": null, "timeRegions": [], "timeShift": null, - "title": "Execution Duration", + "title": "Expensive Executors OPS", "tooltip": { "msResolution": false, "shared": true, @@ -5872,10 +6155,9 @@ }, "yaxes": [ { - "decimals": null, - "format": "s", + "format": "short", "label": null, - "logBase": 1, + "logBase": 10, "max": null, "min": "0", "show": true @@ -5886,7 +6168,7 @@ "logBase": 1, "max": null, "min": null, - "show": false + "show": true } ], "yaxis": { @@ -5901,18 +6183,24 @@ "dashes": false, "datasource": "${DS_TEST-CLUSTER}", "decimals": null, - "description": "TiDB executors using more cpu and memory resources", + "description": "TiDB plan cache hit total", "editable": true, "error": false, + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, "fill": 1, + "fillGradient": 0, "grid": {}, "gridPos": { "h": 8, "w": 12, - "x": 12, - "y": 90 + "x": 0, + "y": 21 }, - "id": 76, + "hiddenSeries": false, + "id": 91, "legend": { "alignAsTable": true, "avg": true, @@ -5932,7 +6220,11 @@ "linewidth": 1, "links": [], "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, "percentage": false, + "pluginVersion": "7.5.11", "pointradius": 5, "points": false, "renderer": "flot", @@ -5942,7 +6234,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(rate(tidb_executor_expensive_total{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$instance\"}[1m])) by (type)", + "expr": "sum(rate(tidb_server_plan_cache_total{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$instance\"}[1m])) by (type)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{type}}", @@ -5954,7 +6246,7 @@ "timeFrom": null, "timeRegions": [], "timeShift": null, - "title": "Expensive Executors OPS", + "title": "Queries Using Plan Cache OPS", "tooltip": { "msResolution": false, "shared": true, @@ -5973,7 +6265,7 @@ { "format": "short", "label": null, - "logBase": 10, + "logBase": 2, "max": null, "min": "0", "show": true @@ -5999,18 +6291,24 @@ "dashes": false, "datasource": "${DS_TEST-CLUSTER}", "decimals": null, - "description": "TiDB plan cache hit total", + "description": "TiDB read table cache hit total", "editable": true, "error": false, + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, "fill": 1, + "fillGradient": 0, "grid": {}, "gridPos": { "h": 8, "w": 12, - "x": 0, - "y": 98 + "x": 12, + "y": 21 }, - "id": 91, + "hiddenSeries": false, + "id": 249, "legend": { "alignAsTable": true, "avg": true, @@ -6030,7 +6328,11 @@ "linewidth": 1, "links": [], "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, "percentage": false, + "pluginVersion": "7.5.11", "pointradius": 5, "points": false, "renderer": "flot", @@ -6040,10 +6342,12 @@ "steppedLine": false, "targets": [ { - "expr": "sum(rate(tidb_server_plan_cache_total{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$instance\"}[1m])) by (type)", + "exemplar": true, + "expr": "sum(rate(tidb_server_read_from_tablecache_total{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$instance\"}[1m]))", "format": "time_series", + "interval": "", "intervalFactor": 2, - "legendFormat": "{{type}}", + "legendFormat": "qps", "refId": "A", "step": 30 } @@ -6052,7 +6356,7 @@ "timeFrom": null, "timeRegions": [], "timeShift": null, - "title": "Queries Using Plan Cache OPS", + "title": "Read From Table Cache OPS", "tooltip": { "msResolution": false, "shared": true, @@ -6097,11 +6401,12 @@ }, { "collapsed": true, + "datasource": null, "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 6 + "y": 5 }, "id": 143, "panels": [ @@ -6138,7 +6443,7 @@ "linewidth": 2, "links": [ { - "type": "dashboard" + "url": "/" } ], "nullPointMode": "null as zero", @@ -6909,11 +7214,12 @@ }, { "collapsed": true, + "datasource": null, "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 7 + "y": 6 }, "id": 144, "panels": [ @@ -7523,11 +7829,12 @@ }, { "collapsed": true, + "datasource": null, "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 8 + "y": 7 }, "id": 145, "panels": [ @@ -8007,11 +8314,12 @@ }, { "collapsed": true, + "datasource": null, "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 9 + "y": 8 }, "id": 147, "panels": [ @@ -8726,8 +9034,8 @@ "dashLength": 10, "dashes": false, "datasource": "${DS_TEST-CLUSTER}", - "description": "It indicates if a request of PD client is forwarded by the PD follower", "decimals": null, + "description": "It indicates if a request of PD client is forwarded by the PD follower", "fill": 1, "gridPos": { "h": 7, @@ -9206,11 +9514,12 @@ }, { "collapsed": true, + "datasource": null, "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 10 + "y": 9 }, "id": 148, "panels": [ @@ -9223,14 +9532,20 @@ "description": "TiDB loading schema time durations by instance", "editable": true, "error": false, + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, "fill": 1, + "fillGradient": 0, "grid": {}, "gridPos": { "h": 7, "w": 12, "x": 0, - "y": 47 + "y": 10 }, + "hiddenSeries": false, "id": 27, "legend": { "alignAsTable": true, @@ -9247,7 +9562,11 @@ "linewidth": 1, "links": [], "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, "percentage": false, + "pluginVersion": "7.5.11", "pointradius": 5, "points": false, "renderer": "flot", @@ -9317,14 +9636,20 @@ "description": "TiDB loading schema times including both failed and successful ones", "editable": true, "error": false, + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, "fill": 0, + "fillGradient": 0, "grid": {}, "gridPos": { "h": 7, "w": 12, "x": 12, - "y": 47 + "y": 10 }, + "hiddenSeries": false, "id": 28, "legend": { "alignAsTable": true, @@ -9341,7 +9666,11 @@ "linewidth": 1, "links": [], "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, "percentage": false, + "pluginVersion": "7.5.11", "pointradius": 5, "points": false, "renderer": "flot", @@ -9417,14 +9746,20 @@ "description": "TiDB schema lease error counts", "editable": true, "error": false, + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, "fill": 0, + "fillGradient": 0, "grid": {}, "gridPos": { "h": 7, "w": 12, "x": 0, - "y": 54 + "y": 17 }, + "hiddenSeries": false, "id": 29, "legend": { "alignAsTable": true, @@ -9443,7 +9778,11 @@ "linewidth": 1, "links": [], "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, "percentage": false, + "pluginVersion": "7.5.11", "pointradius": 5, "points": false, "renderer": "flot", @@ -9513,14 +9852,20 @@ "description": "TiDB load privilege counts", "editable": true, "error": false, + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, "fill": 0, + "fillGradient": 0, "grid": {}, "gridPos": { "h": 7, "w": 12, "x": 12, - "y": 54 + "y": 17 }, + "hiddenSeries": false, "id": 157, "legend": { "alignAsTable": true, @@ -9537,7 +9882,11 @@ "linewidth": 1, "links": [], "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, "percentage": false, + "pluginVersion": "7.5.11", "pointradius": 5, "points": false, "renderer": "flot", @@ -9602,6 +9951,112 @@ "align": false, "alignLevel": null } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_TEST-CLUSTER}", + "description": "TiDB loading table cache time durations by instance", + "editable": true, + "error": false, + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "grid": {}, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 24 + }, + "hiddenSeries": false, + "id": 250, + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.11", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "histogram_quantile(0.99, sum(rate(tidb_server_load_table_cache_seconds_bucket{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$instance\"}[1m])) by (le, instance))", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{instance}}", + "metric": "", + "refId": "A", + "step": 10 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Load Data From Cached Table Duration", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "s", + "label": null, + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } } ], "repeat": null, @@ -9610,11 +10065,12 @@ }, { "collapsed": true, + "datasource": null, "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 11 + "y": 10 }, "id": 149, "panels": [ @@ -10483,7 +10939,6 @@ }, { "expr": "tidb_ddl_backfill_percentage_progress{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$instance\", type=\"modify_column\"}", - "format": "time_series", "intervalFactor": 1, "legendFormat": "{{instance}}-{{type}}", @@ -10538,11 +10993,12 @@ }, { "collapsed": true, + "datasource": null, "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 12 + "y": 11 }, "id": 150, "panels": [ @@ -11892,11 +12348,12 @@ }, { "collapsed": true, + "datasource": null, "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 13 + "y": 12 }, "id": 161, "panels": [ @@ -12086,11 +12543,12 @@ }, { "collapsed": true, + "datasource": null, "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 14 + "y": 13 }, "id": 151, "panels": [ @@ -12459,11 +12917,12 @@ }, { "collapsed": true, + "datasource": null, "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 15 + "y": 14 }, "id": 152, "panels": [ @@ -13277,11 +13736,12 @@ }, { "collapsed": true, + "datasource": null, "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 16 + "y": 15 }, "id": 178, "panels": [ @@ -13685,6 +14145,7 @@ }, { "collapsed": true, + "datasource": null, "gridPos": { "h": 1, "w": 24, @@ -14346,7 +14807,7 @@ } ], "refresh": "30s", - "schemaVersion": 18, + "schemaVersion": 27, "style": "dark", "tags": [], "templating": { @@ -14355,15 +14816,22 @@ "allValue": null, "current": {}, "datasource": "${DS_TEST-CLUSTER}", + "definition": "", + "description": null, + "error": null, "hide": 2, "includeAll": false, "label": "K8s-cluster", "multi": false, "name": "k8s_cluster", "options": [], - "query": "label_values(pd_cluster_status, k8s_cluster)", + "query": { + "query": "label_values(pd_cluster_status, k8s_cluster)", + "refId": "test-cluster-k8s_cluster-Variable-Query" + }, "refresh": 2, "regex": "", + "skipUrlSync": false, "sort": 1, "tagValuesQuery": "", "tags": [], @@ -14375,15 +14843,22 @@ "allValue": null, "current": {}, "datasource": "${DS_TEST-CLUSTER}", + "definition": "", + "description": null, + "error": null, "hide": 2, "includeAll": false, "label": "tidb_cluster", "multi": false, "name": "tidb_cluster", "options": [], - "query": "label_values(pd_cluster_status{k8s_cluster=\"$k8s_cluster\"}, tidb_cluster)", + "query": { + "query": "label_values(pd_cluster_status{k8s_cluster=\"$k8s_cluster\"}, tidb_cluster)", + "refId": "test-cluster-tidb_cluster-Variable-Query" + }, "refresh": 2, "regex": "", + "skipUrlSync": false, "sort": 1, "tagValuesQuery": "", "tags": [], @@ -14451,6 +14926,6 @@ }, "timezone": "browser", "title": "Test-Cluster-TiDB", - "uid": "000000011", - "version": 1 + "uid": "000000100", + "version": 2 } From 8862e98282d366357864913467dcd8f3a8205c43 Mon Sep 17 00:00:00 2001 From: tiancaiamao Date: Thu, 23 Jun 2022 21:21:17 +0800 Subject: [PATCH 2/3] address comment --- metrics/grafana/tidb.json | 379 ++++++++++++++++++-------------------- 1 file changed, 176 insertions(+), 203 deletions(-) diff --git a/metrics/grafana/tidb.json b/metrics/grafana/tidb.json index 2602ce0741055..c79441ecfe5d2 100644 --- a/metrics/grafana/tidb.json +++ b/metrics/grafana/tidb.json @@ -52,7 +52,7 @@ "gnetId": null, "graphTooltip": 1, "id": null, - "iteration": 1652755916281, + "iteration": 1655989598590, "links": [], "panels": [ { @@ -1772,12 +1772,7 @@ "description": "TiDB uptime since last restart", "editable": true, "error": false, - "fieldConfig": { - "defaults": {}, - "overrides": [] - }, "fill": 1, - "fillGradient": 0, "grid": {}, "gridPos": { "h": 7, @@ -1785,7 +1780,6 @@ "x": 0, "y": 3 }, - "hiddenSeries": false, "id": 184, "legend": { "alignAsTable": true, @@ -1802,11 +1796,8 @@ "linewidth": 1, "links": [], "nullPointMode": "null as zero", - "options": { - "alertThreshold": true - }, "percentage": false, - "pluginVersion": "7.5.11", + "pluginVersion": "6.1.6", "pointradius": 5, "points": false, "renderer": "flot", @@ -1882,12 +1873,7 @@ "description": "TiDB process rss memory usage. TiDB heap memory size in use ", "editable": true, "error": false, - "fieldConfig": { - "defaults": {}, - "overrides": [] - }, "fill": 0, - "fillGradient": 0, "grid": {}, "gridPos": { "h": 7, @@ -1895,7 +1881,6 @@ "x": 12, "y": 3 }, - "hiddenSeries": false, "id": 3, "legend": { "alignAsTable": true, @@ -1915,11 +1900,7 @@ "linewidth": 1, "links": [], "nullPointMode": "null as zero", - "options": { - "alertThreshold": true - }, "percentage": false, - "pluginVersion": "7.5.11", "pointradius": 5, "points": false, "renderer": "flot", @@ -1936,7 +1917,7 @@ "refId": "A" }, { - "expr": "go_memstats_heap_sys_bytes{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$instance\", job=\"tidb\"}", + "expr": "go_memory_classes_heap_objects_bytes{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$instance\", job=\"tidb\"} + go_memory_classes_heap_unused_bytes{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$instance\", job=\"tidb\"} + go_memory_classes_heap_released_bytes{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$instance\", job=\"tidb\"} + go_memory_classes_heap_free_bytes{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$instance\", job=\"tidb\"}", "format": "time_series", "hide": true, "intervalFactor": 1, @@ -1944,14 +1925,14 @@ "refId": "B" }, { - "expr": "go_memstats_heap_inuse_bytes{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$instance\", job=\"tidb\"}", + "expr": "go_memory_classes_heap_objects_bytes{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$instance\", job=\"tidb\"} + go_memory_classes_heap_unused_bytes{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$instance\", job=\"tidb\"}", "format": "time_series", "intervalFactor": 1, "legendFormat": "HeapInuse-{{instance}}", "refId": "C" }, { - "expr": "go_memstats_heap_alloc_bytes{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$instance\", job=\"tidb\"}", + "expr": "go_memory_classes_heap_objects_bytes{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$instance\", job=\"tidb\"}", "format": "time_series", "hide": true, "intervalFactor": 1, @@ -1959,7 +1940,7 @@ "refId": "D" }, { - "expr": "go_memstats_heap_idle_bytes{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$instance\", job=\"tidb\"}", + "expr": "go_memory_classes_heap_released_bytes{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$instance\", job=\"tidb\"} + go_memory_classes_heap_free_bytes{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$instance\", job=\"tidb\"}", "format": "time_series", "hide": true, "intervalFactor": 1, @@ -1967,14 +1948,14 @@ "refId": "E" }, { - "expr": "go_memstats_heap_released_bytes{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$instance\", job=\"tidb\"}", + "expr": "go_memory_classes_heap_released_bytes{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$instance\", job=\"tidb\"}", "hide": true, "interval": "", "legendFormat": "HeapReleased-{{instance}}", "refId": "F" }, { - "expr": "go_memstats_next_gc_bytes{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", job=\"tidb\"}", + "expr": "go_gc_heap_goal_bytes{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", job=\"tidb\"}", "hide": true, "interval": "", "legendFormat": "GCTrigger-{{instance}}", @@ -2039,12 +2020,7 @@ "description": "TiDB cpu usage calculated with process cpu running seconds", "editable": true, "error": false, - "fieldConfig": { - "defaults": {}, - "overrides": [] - }, "fill": 1, - "fillGradient": 0, "grid": {}, "gridPos": { "h": 7, @@ -2052,7 +2028,6 @@ "x": 0, "y": 10 }, - "hiddenSeries": false, "id": 168, "legend": { "alignAsTable": true, @@ -2069,11 +2044,7 @@ "linewidth": 1, "links": [], "nullPointMode": "null as zero", - "options": { - "alertThreshold": true - }, "percentage": false, - "pluginVersion": "7.5.11", "pointradius": 5, "points": false, "renderer": "flot", @@ -2160,12 +2131,7 @@ "description": "TiDB current connection counts", "editable": true, "error": false, - "fieldConfig": { - "defaults": {}, - "overrides": [] - }, "fill": 1, - "fillGradient": 0, "grid": {}, "gridPos": { "h": 7, @@ -2173,7 +2139,6 @@ "x": 12, "y": 10 }, - "hiddenSeries": false, "id": 8, "legend": { "alignAsTable": true, @@ -2190,11 +2155,7 @@ "linewidth": 1, "links": [], "nullPointMode": "null as zero", - "options": { - "alertThreshold": true - }, "percentage": false, - "pluginVersion": "7.5.11", "pointradius": 5, "points": false, "renderer": "flot", @@ -2275,19 +2236,13 @@ "dashes": false, "datasource": "${DS_TEST-CLUSTER}", "description": "TiDB process opened file descriptors count", - "fieldConfig": { - "defaults": {}, - "overrides": [] - }, "fill": 1, - "fillGradient": 0, "gridPos": { "h": 7, "w": 12, "x": 0, "y": 17 }, - "hiddenSeries": false, "id": 188, "legend": { "alignAsTable": true, @@ -2304,11 +2259,7 @@ "linewidth": 1, "links": [], "nullPointMode": "null", - "options": { - "alertThreshold": true - }, "percentage": false, - "pluginVersion": "7.5.11", "pointradius": 5, "points": false, "renderer": "flot", @@ -2375,12 +2326,7 @@ "description": "TiDB connection disconnected counts", "editable": true, "error": false, - "fieldConfig": { - "defaults": {}, - "overrides": [] - }, "fill": 1, - "fillGradient": 0, "grid": {}, "gridPos": { "h": 7, @@ -2388,7 +2334,6 @@ "x": 12, "y": 17 }, - "hiddenSeries": false, "id": 205, "legend": { "alignAsTable": true, @@ -2405,11 +2350,7 @@ "linewidth": 1, "links": [], "nullPointMode": "null as zero", - "options": { - "alertThreshold": true - }, "percentage": false, - "pluginVersion": "7.5.11", "pointradius": 5, "points": false, "renderer": "flot", @@ -2481,41 +2422,31 @@ "dashLength": 10, "dashes": false, "datasource": "${DS_TEST-CLUSTER}", - "description": "TiDB Server critical events total, including start/close/shutdown/hang etc", - "fieldConfig": { - "defaults": {}, - "overrides": [] - }, + "description": "TiDB process current goroutines count", "fill": 1, - "fillGradient": 0, "gridPos": { "h": 7, "w": 12, - "x": 0, + "x": 12, "y": 24 }, - "hiddenSeries": false, - "id": 49, + "id": 61, "legend": { "alignAsTable": true, "avg": false, - "current": false, - "max": false, + "current": true, + "max": true, "min": false, "rightSide": true, "show": true, "total": false, - "values": false + "values": true }, "lines": true, "linewidth": 1, "links": [], "nullPointMode": "null", - "options": { - "alertThreshold": true - }, "percentage": false, - "pluginVersion": "7.5.11", "pointradius": 5, "points": false, "renderer": "flot", @@ -2525,10 +2456,10 @@ "steppedLine": false, "targets": [ { - "expr": "increase(tidb_server_event_total{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$instance\"}[10m])", + "expr": "go_sched_goroutines_goroutines{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$instance\", job=~\"tidb.*\"}", "format": "time_series", "intervalFactor": 2, - "legendFormat": "{{instance}}-server {{type}}", + "legendFormat": "{{instance}}", "refId": "A" } ], @@ -2536,7 +2467,7 @@ "timeFrom": null, "timeRegions": [], "timeShift": null, - "title": "Events OPM", + "title": "Goroutine Count", "tooltip": { "shared": true, "sort": 0, @@ -2579,41 +2510,31 @@ "dashLength": 10, "dashes": false, "datasource": "${DS_TEST-CLUSTER}", - "description": "TiDB process current goroutines count", - "fieldConfig": { - "defaults": {}, - "overrides": [] - }, + "description": "TiDB Server critical events total, including start/close/shutdown/hang etc", "fill": 1, - "fillGradient": 0, "gridPos": { "h": 7, "w": 12, - "x": 12, - "y": 24 + "x": 0, + "y": 38 }, - "hiddenSeries": false, - "id": 61, + "id": 49, "legend": { "alignAsTable": true, "avg": false, - "current": true, - "max": true, + "current": false, + "max": false, "min": false, "rightSide": true, "show": true, "total": false, - "values": true + "values": false }, "lines": true, "linewidth": 1, "links": [], "nullPointMode": "null", - "options": { - "alertThreshold": true - }, "percentage": false, - "pluginVersion": "7.5.11", "pointradius": 5, "points": false, "renderer": "flot", @@ -2623,10 +2544,10 @@ "steppedLine": false, "targets": [ { - "expr": " go_goroutines{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$instance\", job=~\"tidb.*\"}", + "expr": "increase(tidb_server_event_total{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$instance\"}[10m])", "format": "time_series", "intervalFactor": 2, - "legendFormat": "{{instance}}", + "legendFormat": "{{instance}}-server {{type}}", "refId": "A" } ], @@ -2634,7 +2555,7 @@ "timeFrom": null, "timeRegions": [], "timeShift": null, - "title": "Goroutine Count", + "title": "Events OPM", "tooltip": { "shared": true, "sort": 0, @@ -2680,20 +2601,14 @@ "description": "TiDB instance prepare statements count", "editable": true, "error": false, - "fieldConfig": { - "defaults": {}, - "overrides": [] - }, "fill": 1, - "fillGradient": 0, "grid": {}, "gridPos": { "h": 7, "w": 12, "x": 0, - "y": 31 + "y": 45 }, - "hiddenSeries": false, "id": 165, "legend": { "alignAsTable": true, @@ -2710,11 +2625,7 @@ "linewidth": 1, "links": [], "nullPointMode": "null as zero", - "options": { - "alertThreshold": true - }, "percentage": false, - "pluginVersion": "7.5.11", "pointradius": 5, "points": false, "renderer": "flot", @@ -2795,19 +2706,13 @@ "dashes": false, "datasource": "${DS_TEST-CLUSTER}", "description": "TiDB instance monitor average keep alive times", - "fieldConfig": { - "defaults": {}, - "overrides": [] - }, "fill": 1, - "fillGradient": 0, "gridPos": { "h": 7, "w": 12, "x": 12, - "y": 31 + "y": 45 }, - "hiddenSeries": false, "id": 82, "legend": { "alignAsTable": true, @@ -2824,11 +2729,7 @@ "linewidth": 1, "links": [], "nullPointMode": "null", - "options": { - "alertThreshold": true - }, "percentage": false, - "pluginVersion": "7.5.11", "pointradius": 5, "points": false, "renderer": "flot", @@ -2893,19 +2794,13 @@ "dashes": false, "datasource": "${DS_TEST-CLUSTER}", "description": "TiDB instance critical errors count including panic etc", - "fieldConfig": { - "defaults": {}, - "overrides": [] - }, "fill": 1, - "fillGradient": 0, "gridPos": { "h": 7, "w": 12, "x": 0, - "y": 38 + "y": 52 }, - "hiddenSeries": false, "id": 54, "legend": { "alignAsTable": true, @@ -2922,11 +2817,7 @@ "linewidth": 1, "links": [], "nullPointMode": "null", - "options": { - "alertThreshold": true - }, "percentage": false, - "pluginVersion": "7.5.11", "pointradius": 5, "points": false, "renderer": "flot", @@ -3000,19 +2891,13 @@ "dashes": false, "datasource": "${DS_TEST-CLUSTER}", "description": "TiDB monitor time jump back count", - "fieldConfig": { - "defaults": {}, - "overrides": [] - }, "fill": 1, - "fillGradient": 0, "gridPos": { "h": 7, "w": 12, "x": 12, - "y": 38 + "y": 52 }, - "hiddenSeries": false, "id": 166, "legend": { "alignAsTable": true, @@ -3029,11 +2914,7 @@ "linewidth": 1, "links": [], "nullPointMode": "null", - "options": { - "alertThreshold": true - }, "percentage": false, - "pluginVersion": "7.5.11", "pointradius": 5, "points": false, "renderer": "flot", @@ -3098,16 +2979,12 @@ "dashes": false, "datasource": "${DS_TEST-CLUSTER}", "description": "Duration (us) for getting token, it should be small until concurrency limit is reached.", - "fieldConfig": { - "defaults": {}, - "overrides": [] - }, "fill": 1, "gridPos": { "h": 7, "w": 12, "x": 0, - "y": 45 + "y": 59 }, "id": 111, "legend": { @@ -3124,7 +3001,6 @@ "links": [], "nullPointMode": "null", "percentage": false, - "pluginVersion": "7.5.11", "pointradius": 5, "points": false, "renderer": "flot", @@ -3189,16 +3065,12 @@ "dashes": false, "datasource": "${DS_TEST-CLUSTER}", "description": "TiDB instance critical errors count including panic etc", - "fieldConfig": { - "defaults": {}, - "overrides": [] - }, "fill": 1, "gridPos": { "h": 7, "w": 12, "x": 12, - "y": 45 + "y": 59 }, "id": 191, "legend": { @@ -3217,7 +3089,6 @@ "links": [], "nullPointMode": "null", "percentage": false, - "pluginVersion": "7.5.11", "pointradius": 5, "points": false, "renderer": "flot", @@ -3283,16 +3154,12 @@ "dashes": false, "datasource": "${DS_TEST-CLUSTER}", "description": "Data traffic statistics between TiDB and the client.", - "fieldConfig": { - "defaults": {}, - "overrides": [] - }, "fill": 1, "gridPos": { "h": 7, "w": 12, "x": 0, - "y": 52 + "y": 66 }, "id": 211, "legend": { @@ -3309,7 +3176,6 @@ "links": [], "nullPointMode": "null", "percentage": false, - "pluginVersion": "7.5.11", "pointradius": 5, "points": false, "renderer": "flot", @@ -3386,16 +3252,12 @@ "dashes": false, "datasource": "${DS_TEST-CLUSTER}", "description": "TiDB processing handshake error count", - "fieldConfig": { - "defaults": {}, - "overrides": [] - }, "fill": 1, "gridPos": { "h": 7, "w": 12, "x": 12, - "y": 52 + "y": 66 }, "id": 167, "legend": { @@ -3414,7 +3276,6 @@ "links": [], "nullPointMode": "null", "percentage": false, - "pluginVersion": "7.5.11", "pointradius": 5, "points": false, "renderer": "flot", @@ -6291,7 +6152,7 @@ "dashes": false, "datasource": "${DS_TEST-CLUSTER}", "decimals": null, - "description": "TiDB read table cache hit total", + "description": "TiDB plan cache hit total", "editable": true, "error": false, "fieldConfig": { @@ -6308,6 +6169,114 @@ "y": 21 }, "hiddenSeries": false, + "id": 250, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": true, + "min": false, + "rightSide": true, + "show": true, + "sort": null, + "sortDesc": null, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.11", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(rate(tidb_server_plan_cache_total{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$instance\"}[1m])) by (type)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{type}}", + "refId": "A", + "step": 30 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Queries Using Plan Cache OPS", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 2, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_TEST-CLUSTER}", + "decimals": null, + "description": "TiDB read table cache hit total", + "editable": true, + "error": false, + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "grid": {}, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 29 + }, + "hiddenSeries": false, "id": 249, "legend": { "alignAsTable": true, @@ -6373,6 +6342,7 @@ }, "yaxes": [ { + "$$hashKey": "object:68", "format": "short", "label": null, "logBase": 2, @@ -6381,6 +6351,7 @@ "show": true }, { + "$$hashKey": "object:69", "format": "short", "label": null, "logBase": 1, @@ -7062,7 +7033,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(rate(tidb_distsql_copr_cache_sum{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$instance\"}[1m])) by (type)", + "expr": "sum(rate(tidb_distsql_copr_cache{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$instance\"}[1m])) by (type)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{type}}", @@ -9633,14 +9604,14 @@ "dashLength": 10, "dashes": false, "datasource": "${DS_TEST-CLUSTER}", - "description": "TiDB loading schema times including both failed and successful ones", + "description": "TiDB loading schema time durations by instance", "editable": true, "error": false, "fieldConfig": { "defaults": {}, "overrides": [] }, - "fill": 0, + "fill": 1, "fillGradient": 0, "grid": {}, "gridPos": { @@ -9650,7 +9621,7 @@ "y": 10 }, "hiddenSeries": false, - "id": 28, + "id": 251, "legend": { "alignAsTable": true, "avg": false, @@ -9674,22 +9645,17 @@ "pointradius": 5, "points": false, "renderer": "flot", - "seriesOverrides": [ - { - "alias": "/.*failed/", - "bars": true - } - ], + "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { - "expr": "sum(rate(tidb_domain_load_schema_total{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$instance\"}[1m])) by (instance,type)", + "expr": "histogram_quantile(0.99, sum(rate(tidb_domain_load_schema_duration_seconds_bucket{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$instance\"}[1m])) by (le, instance))", "format": "time_series", "intervalFactor": 2, - "legendFormat": "{{instance}}-{{type}}", - "metric": "tidb_domain_load_schema_duration_count", + "legendFormat": "{{instance}}", + "metric": "", "refId": "A", "step": 10 } @@ -9698,7 +9664,7 @@ "timeFrom": null, "timeRegions": [], "timeShift": null, - "title": "Load Schema OPS", + "title": "Load Schema Duration", "tooltip": { "msResolution": false, "shared": true, @@ -9715,11 +9681,11 @@ }, "yaxes": [ { - "format": "short", + "format": "s", "label": null, - "logBase": 10, + "logBase": 1, "max": null, - "min": null, + "min": "0", "show": true }, { @@ -9849,7 +9815,7 @@ "dashLength": 10, "dashes": false, "datasource": "${DS_TEST-CLUSTER}", - "description": "TiDB load privilege counts", + "description": "TiDB loading schema times including both failed and successful ones", "editable": true, "error": false, "fieldConfig": { @@ -9866,7 +9832,7 @@ "y": 17 }, "hiddenSeries": false, - "id": 157, + "id": 28, "legend": { "alignAsTable": true, "avg": false, @@ -9901,7 +9867,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(rate(tidb_domain_load_privilege_total{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$instance\"}[1m])) by (instance,type)", + "expr": "sum(rate(tidb_domain_load_schema_total{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$instance\"}[1m])) by (instance,type)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{instance}}-{{type}}", @@ -9914,7 +9880,7 @@ "timeFrom": null, "timeRegions": [], "timeShift": null, - "title": "Load Privilege OPS", + "title": "Load Schema OPS", "tooltip": { "msResolution": false, "shared": true, @@ -9965,7 +9931,7 @@ "defaults": {}, "overrides": [] }, - "fill": 1, + "fill": 0, "fillGradient": 0, "grid": {}, "gridPos": { @@ -9975,7 +9941,7 @@ "y": 24 }, "hiddenSeries": false, - "id": 250, + "id": 157, "legend": { "alignAsTable": true, "avg": false, @@ -9999,7 +9965,12 @@ "pointradius": 5, "points": false, "renderer": "flot", - "seriesOverrides": [], + "seriesOverrides": [ + { + "alias": "/.*failed/", + "bars": true + } + ], "spaceLength": 10, "stack": false, "steppedLine": false, @@ -10011,7 +9982,7 @@ "interval": "", "intervalFactor": 2, "legendFormat": "{{instance}}", - "metric": "", + "metric": "tidb_domain_load_schema_duration_count", "refId": "A", "step": 10 } @@ -10037,14 +10008,16 @@ }, "yaxes": [ { - "format": "s", + "$$hashKey": "object:140", + "format": "short", "label": null, - "logBase": 1, + "logBase": 10, "max": null, - "min": "0", + "min": null, "show": true }, { + "$$hashKey": "object:141", "format": "short", "label": null, "logBase": 1, From 247df2cdd5fbd6762d39ef84b01cb473d49a1402 Mon Sep 17 00:00:00 2001 From: tiancaiamao Date: Thu, 23 Jun 2022 21:33:48 +0800 Subject: [PATCH 3/3] resolve conflict --- metrics/grafana/tidb.json | 162 ++++++++++++++++++++++++++++---------- 1 file changed, 119 insertions(+), 43 deletions(-) diff --git a/metrics/grafana/tidb.json b/metrics/grafana/tidb.json index 1ba9b45647601..30d2c788dc0e1 100644 --- a/metrics/grafana/tidb.json +++ b/metrics/grafana/tidb.json @@ -52,7 +52,7 @@ "gnetId": null, "graphTooltip": 1, "id": null, - "iteration": 1655989598590, + "iteration": 1655990780337, "links": [], "panels": [ { @@ -73,13 +73,19 @@ "dashes": false, "datasource": "${DS_TEST-CLUSTER}", "description": "TiDB query durations by histogram buckets with different percents", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, "fill": 1, + "fillGradient": 0, "gridPos": { "h": 6, "w": 12, "x": 0, "y": 1 }, + "hiddenSeries": false, "id": 80, "legend": { "alignAsTable": false, @@ -98,7 +104,11 @@ "linewidth": 1, "links": [], "nullPointMode": "null", + "options": { + "alertThreshold": true + }, "percentage": false, + "pluginVersion": "7.5.11", "pointradius": 5, "points": false, "renderer": "flot", @@ -186,7 +196,12 @@ "description": "MySQL commands processing numbers per second. See https://dev.mysql.com/doc/internals/en/text-protocol.html and https://dev.mysql.com/doc/internals/en/prepared-statements.html", "editable": true, "error": false, + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, "fill": 1, + "fillGradient": 0, "grid": {}, "gridPos": { "h": 6, @@ -194,6 +209,7 @@ "x": 12, "y": 1 }, + "hiddenSeries": false, "id": 42, "legend": { "alignAsTable": false, @@ -216,7 +232,11 @@ "links": [], "maxPerRow": 1, "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, "percentage": false, + "pluginVersion": "7.5.11", "pointradius": 5, "points": false, "renderer": "flot", @@ -307,7 +327,12 @@ "description": "TiDB statement statistics", "editable": true, "error": false, + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, "fill": 1, + "fillGradient": 0, "grid": {}, "gridPos": { "h": 6, @@ -315,6 +340,7 @@ "x": 0, "y": 7 }, + "hiddenSeries": false, "id": 21, "legend": { "alignAsTable": true, @@ -335,7 +361,11 @@ "linewidth": 1, "links": [], "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, "percentage": false, + "pluginVersion": "7.5.11", "pointradius": 5, "points": false, "renderer": "flot", @@ -411,7 +441,12 @@ "description": "TiDB command total statistics including both successful and failed ones", "editable": true, "error": false, + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, "fill": 0, + "fillGradient": 0, "grid": {}, "gridPos": { "h": 6, @@ -419,6 +454,7 @@ "x": 12, "y": 7 }, + "hiddenSeries": false, "id": 2, "legend": { "alignAsTable": true, @@ -441,7 +477,11 @@ "links": [], "maxPerRow": 1, "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, "percentage": false, + "pluginVersion": "7.5.11", "pointradius": 5, "points": false, "renderer": "flot", @@ -514,13 +554,19 @@ "datasource": "${DS_TEST-CLUSTER}", "decimals": null, "description": "TiDB failed query statistics by query type", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, "fill": 0, + "fillGradient": 0, "gridPos": { "h": 6, "w": 24, "x": 0, "y": 13 }, + "hiddenSeries": false, "id": 137, "legend": { "alignAsTable": true, @@ -540,7 +586,11 @@ "linewidth": 1, "links": [], "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, "percentage": false, + "pluginVersion": "7.5.11", "pointradius": 5, "points": false, "renderer": "flot", @@ -605,13 +655,19 @@ "dashes": false, "datasource": "${DS_TEST-CLUSTER}", "description": "TiDB slow query statistics with slow query durations and coprocessor waiting/executing durations", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, "fill": 1, + "fillGradient": 0, "gridPos": { "h": 6, "w": 12, "x": 0, - "y": 25 + "y": 19 }, + "hiddenSeries": false, "id": 112, "legend": { "avg": false, @@ -626,7 +682,11 @@ "linewidth": 1, "links": [], "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, "percentage": false, + "pluginVersion": "7.5.11", "pointradius": 5, "points": false, "renderer": "flot", @@ -705,13 +765,19 @@ "dashes": false, "datasource": "${DS_TEST-CLUSTER}", "description": "TiDB connection idle durations", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, "fill": 1, + "fillGradient": 0, "gridPos": { "h": 6, "w": 12, "x": 12, - "y": 25 + "y": 19 }, + "hiddenSeries": false, "id": 218, "legend": { "avg": false, @@ -726,7 +792,11 @@ "linewidth": 1, "links": [], "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, "percentage": false, + "pluginVersion": "7.5.11", "pointradius": 5, "points": false, "renderer": "flot", @@ -832,13 +902,19 @@ "dashes": false, "datasource": "${DS_TEST-CLUSTER}", "description": "TiDB durations for different query types with 99.9 percent buckets", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, "fill": 1, + "fillGradient": 0, "gridPos": { "h": 6, "w": 12, "x": 0, "y": 25 }, + "hiddenSeries": false, "id": 136, "legend": { "avg": false, @@ -853,7 +929,11 @@ "linewidth": 1, "links": [], "nullPointMode": "null", + "options": { + "alertThreshold": true + }, "percentage": false, + "pluginVersion": "7.5.11", "pointradius": 5, "points": false, "renderer": "flot", @@ -918,13 +998,19 @@ "dashes": false, "datasource": "${DS_TEST-CLUSTER}", "description": "TiDB durations for different query types with 99 percent buckets", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, "fill": 1, + "fillGradient": 0, "gridPos": { "h": 6, "w": 12, "x": 12, "y": 25 }, + "hiddenSeries": false, "id": 134, "legend": { "avg": false, @@ -939,7 +1025,11 @@ "linewidth": 1, "links": [], "nullPointMode": "null", + "options": { + "alertThreshold": true + }, "percentage": false, + "pluginVersion": "7.5.11", "pointradius": 5, "points": false, "renderer": "flot", @@ -1004,13 +1094,19 @@ "dashes": false, "datasource": "${DS_TEST-CLUSTER}", "description": "TiDB durations for different query types with 95 percent buckets", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, "fill": 1, + "fillGradient": 0, "gridPos": { "h": 6, "w": 12, "x": 0, "y": 31 }, + "hiddenSeries": false, "id": 132, "legend": { "avg": false, @@ -1025,7 +1121,11 @@ "linewidth": 1, "links": [], "nullPointMode": "null", + "options": { + "alertThreshold": true + }, "percentage": false, + "pluginVersion": "7.5.11", "pointradius": 5, "points": false, "renderer": "flot", @@ -1090,13 +1190,19 @@ "dashes": false, "datasource": "${DS_TEST-CLUSTER}", "description": "TiDB durations for different query types with 80 percent buckets", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, "fill": 1, + "fillGradient": 0, "gridPos": { "h": 6, "w": 12, "x": 12, "y": 31 }, + "hiddenSeries": false, "id": 130, "legend": { "avg": false, @@ -1111,7 +1217,11 @@ "linewidth": 1, "links": [], "nullPointMode": "null", + "options": { + "alertThreshold": true + }, "percentage": false, + "pluginVersion": "7.5.11", "pointradius": 5, "points": false, "renderer": "flot", @@ -6260,7 +6370,6 @@ "dashes": false, "datasource": "${DS_TEST-CLUSTER}", "decimals": null, -<<<<<<< HEAD "description": "TiDB read table cache hit total", "editable": true, "error": false, @@ -6270,26 +6379,14 @@ }, "fill": 1, "fillGradient": 0, -======= - "description": "TiDB plan cache miss total", - "editable": true, - "error": false, - "fill": 1, ->>>>>>> master "grid": {}, "gridPos": { "h": 8, "w": 12, -<<<<<<< HEAD "x": 0, "y": 29 }, "hiddenSeries": false, -======= - "x": 12, - "y": 98 - }, ->>>>>>> master "id": 249, "legend": { "alignAsTable": true, @@ -6310,15 +6407,11 @@ "linewidth": 1, "links": [], "nullPointMode": "null as zero", -<<<<<<< HEAD "options": { "alertThreshold": true }, "percentage": false, "pluginVersion": "7.5.11", -======= - "percentage": false, ->>>>>>> master "pointradius": 5, "points": false, "renderer": "flot", @@ -6328,19 +6421,12 @@ "steppedLine": false, "targets": [ { -<<<<<<< HEAD "exemplar": true, "expr": "sum(rate(tidb_server_read_from_tablecache_total{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$instance\"}[1m]))", "format": "time_series", "interval": "", "intervalFactor": 2, "legendFormat": "qps", -======= - "expr": "sum(rate(tidb_server_plan_cache_miss_total{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$instance\"}[1m])) by (type)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{type}}", ->>>>>>> master "refId": "A", "step": 30 } @@ -6349,11 +6435,7 @@ "timeFrom": null, "timeRegions": [], "timeShift": null, -<<<<<<< HEAD "title": "Read From Table Cache OPS", -======= - "title": "Plan Cache Miss OPS", ->>>>>>> master "tooltip": { "msResolution": false, "shared": true, @@ -6370,10 +6452,7 @@ }, "yaxes": [ { -<<<<<<< HEAD - "$$hashKey": "object:68", -======= ->>>>>>> master + "$$hashKey": "object:469", "format": "short", "label": null, "logBase": 2, @@ -6382,10 +6461,7 @@ "show": true }, { -<<<<<<< HEAD - "$$hashKey": "object:69", -======= ->>>>>>> master + "$$hashKey": "object:470", "format": "short", "label": null, "logBase": 1, @@ -10042,7 +10118,7 @@ }, "yaxes": [ { - "$$hashKey": "object:140", + "$$hashKey": "object:541", "format": "short", "label": null, "logBase": 10, @@ -10051,7 +10127,7 @@ "show": true }, { - "$$hashKey": "object:141", + "$$hashKey": "object:542", "format": "short", "label": null, "logBase": 1, @@ -14933,6 +15009,6 @@ }, "timezone": "browser", "title": "Test-Cluster-TiDB", - "uid": "000000100", - "version": 2 + "uid": "000000011", + "version": 1 }