Skip to content

Commit

Permalink
metrics: update active connection promeQL and add metric: miss plan c…
Browse files Browse the repository at this point in the history
  • Loading branch information
Yui-Song authored Nov 3, 2022
1 parent 09f6295 commit 4df8d85
Showing 1 changed file with 45 additions and 8 deletions.
53 changes: 45 additions & 8 deletions metrics/grafana/performance_overview.json
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@
"targets": [
{
"exemplar": true,
"expr": "sum(rate(tidb_server_handle_query_duration_seconds_sum{k8s_cluster=\"$k8s_cluster\",tidb_cluster=\"$tidb_cluster\", sql_type!=\"internal\"}[1m]))",
"expr": "sum(tidb_server_tokens{k8s_cluster=\"$k8s_cluster\",tidb_cluster=\"$tidb_cluster\"})",
"hide": false,
"interval": "",
"legendFormat": "database time",
Expand Down Expand Up @@ -302,7 +302,7 @@
"targets": [
{
"exemplar": true,
"expr": "sum(rate(tidb_server_handle_query_duration_seconds_sum{k8s_cluster=\"$k8s_cluster\",tidb_cluster=\"$tidb_cluster\", sql_type!=\"internal\"}[1m]))",
"expr": "sum(tidb_server_tokens{k8s_cluster=\"$k8s_cluster\",tidb_cluster=\"$tidb_cluster\"})",
"hide": false,
"interval": "",
"legendFormat": "database time",
Expand Down Expand Up @@ -850,13 +850,24 @@
"targets": [
{
"exemplar": true,
"expr": "sum(rate(tidb_server_plan_cache_total{k8s_cluster=\"$k8s_cluster\",tidb_cluster=\"$tidb_cluster\"}[1m])) by (type)",
"expr": "sum(rate(tidb_server_plan_cache_total{k8s_cluster=\"$k8s_cluster\",tidb_cluster=\"$tidb_cluster\"}[1m]))",
"format": "time_series",
"interval": "",
"intervalFactor": 2,
"legendFormat": "avg",
"legendFormat": "avg-hit",
"refId": "A",
"step": 30
},
{
"exemplar": true,
"expr": "sum(rate(tidb_server_plan_cache_miss_total{k8s_cluster=\"$k8s_cluster\",tidb_cluster=\"$tidb_cluster\"}[1m]))",
"format": "time_series",
"hide": false,
"interval": "",
"intervalFactor": 2,
"legendFormat": "avg-miss",
"refId": "B",
"step": 30
}
],
"thresholds": [],
Expand Down Expand Up @@ -1109,11 +1120,19 @@
},
{
"exemplar": true,
"expr": "sum(rate(tidb_server_handle_query_duration_seconds_sum{k8s_cluster=\"$k8s_cluster\",tidb_cluster=\"$tidb_cluster\", sql_type!=\"internal\"}[1m]))",
"expr": "sum(tidb_server_tokens{k8s_cluster=\"$k8s_cluster\",tidb_cluster=\"$tidb_cluster\"})",
"hide": false,
"interval": "",
"legendFormat": "active connections",
"refId": "C"
"refId": "D"
},
{
"exemplar": true,
"expr": "sum(tidb_server_tokens{k8s_cluster=\"$k8s_cluster\",tidb_cluster=\"$tidb_cluster\"}) by (instance)",
"hide": true,
"interval": "",
"legendFormat": "ac-{{instance}}",
"refId": "E"
}
],
"thresholds": [],
Expand Down Expand Up @@ -2283,7 +2302,7 @@
"dashLength": 10,
"dashes": false,
"datasource": "${DS_TEST-CLUSTER}",
"description": "- TSO Wait Duration: The duration of a client starting to wait for the TS until received the TS result.\n- TSO RPC Duration: The duration of a client sending TSO request until received the response.",
"description": "- TSO Wait Duration: The duration of a client starting to wait for the TS until received the TS result.\n- TSO RPC Duration: The duration of a client sending TSO request until received the response.\n- PD Server Handle Time: The time consumed by handling TiDB requests.",
"editable": true,
"error": false,
"fill": 1,
Expand Down Expand Up @@ -2341,6 +2360,14 @@
"legendFormat": "rpc - avg",
"refId": "A"
},
{
"exemplar": true,
"expr": "(sum(rate(pd_server_handle_tso_duration_seconds_sum{k8s_cluster=\"$k8s_cluster\",tidb_cluster=\"$tidb_cluster\"}[1m])) / sum(rate(pd_server_handle_tso_duration_seconds_count{k8s_cluster=\"$k8s_cluster\",tidb_cluster=\"$tidb_cluster\"}[1m])))",
"hide": false,
"interval": "",
"legendFormat": "handle - avg",
"refId": "F"
},
{
"exemplar": true,
"expr": "histogram_quantile(0.99, sum(rate(pd_client_cmd_handle_cmds_duration_seconds_bucket{k8s_cluster=\"$k8s_cluster\",tidb_cluster=\"$tidb_cluster\", type=\"wait\"}[1m])) by (le))",
Expand All @@ -2359,6 +2386,16 @@
"intervalFactor": 2,
"legendFormat": "rpc - 99",
"refId": "E"
},
{
"exemplar": true,
"expr": "histogram_quantile(0.99, sum(rate(pd_server_handle_tso_duration_seconds_bucket{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\"}[30s])) by (type, le))",
"format": "time_series",
"hide": false,
"interval": "",
"intervalFactor": 2,
"legendFormat": "handle - 99",
"refId": "C"
}
],
"thresholds": [],
Expand Down Expand Up @@ -3181,4 +3218,4 @@
"title": "Test-Cluster-Performance-Overview",
"uid": "eDbRZpnWa",
"version": 2
}
}

0 comments on commit 4df8d85

Please sign in to comment.