feat(storage): database/transaction/cursor metrics (#5149)

This commit is contained in:
Alexey Shekhirin
2023-10-27 18:47:41 +01:00
committed by GitHub
parent 7019e023f5
commit a9fa281816
12 changed files with 954 additions and 181 deletions

View File

@ -497,7 +497,6 @@
}
},
"mappings": [],
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
@ -523,7 +522,7 @@
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
"showLegend": false
},
"tooltip": {
"mode": "single",
@ -539,7 +538,7 @@
},
"editorMode": "code",
"exemplar": false,
"expr": "rate(reth_tx_commit_sum{instance=~\"$instance\"}[$__rate_interval]) / rate(reth_tx_commit_count{instance=~\"$instance\"}[$__rate_interval])",
"expr": "avg(rate(reth_database_transaction_close_duration_seconds_sum{instance=~\"$instance\", outcome=\"commit\"}[$__rate_interval]) / rate(reth_database_transaction_close_duration_seconds_count{instance=~\"$instance\", outcome=\"commit\"}[$__rate_interval]) >= 0)",
"format": "time_series",
"instant": false,
"legendFormat": "Commit time",
@ -628,7 +627,7 @@
},
"editorMode": "code",
"exemplar": false,
"expr": "sum(increase(reth_tx_commit{instance=~\"$instance\"}[$__interval])) by (quantile)",
"expr": "avg(avg_over_time(reth_database_transaction_close_duration_seconds{instance=~\"$instance\", outcome=\"commit\"}[$__interval])) by (quantile)",
"format": "time_series",
"instant": false,
"legendFormat": "{{quantile}}",
@ -639,6 +638,394 @@
"title": "Commit time heatmap",
"type": "heatmap"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"description": "The average time a database transaction was open.",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic",
"seriesBy": "last"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "points",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"unit": "s"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 26
},
"id": 117,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "9.3.6",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"exemplar": false,
"expr": "sum(rate(reth_database_transaction_open_duration_seconds_sum{instance=~\"$instance\", outcome!=\"\"}[$__rate_interval]) / rate(reth_database_transaction_open_duration_seconds_count{instance=~\"$instance\", outcome!=\"\"}[$__rate_interval])) by (outcome, mode)",
"format": "time_series",
"instant": false,
"legendFormat": "{{mode}}, {{outcome}}",
"range": true,
"refId": "A"
}
],
"title": "Average transaction open time",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"description": "The maximum time the database transaction was open.",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "points",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"unit": "s"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 26
},
"id": 116,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "10.1.0",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"exemplar": false,
"expr": "max(max_over_time(reth_database_transaction_open_duration_seconds{instance=~\"$instance\", outcome!=\"\", quantile=\"1\"}[$__interval])) by (outcome, mode)",
"format": "time_series",
"instant": false,
"legendFormat": "{{mode}}, {{outcome}}",
"range": true,
"refId": "A"
}
],
"title": "Max transaction open time",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"description": "",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "none"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 34
},
"id": 119,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "10.1.0",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"exemplar": false,
"expr": "sum(reth_database_transaction_open_total{instance=~\"$instance\"}) by (mode)",
"format": "time_series",
"instant": false,
"legendFormat": "{{mode}}",
"range": true,
"refId": "A"
}
],
"title": "Number of open transactions",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"description": "The maximum time the database transaction operation which inserts a large value took.",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "points",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "s"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 34
},
"id": 118,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "10.1.0",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"exemplar": false,
"expr": "max(max_over_time(reth_database_operation_large_value_duration_seconds{instance=~\"$instance\", quantile=\"1\"}[$__interval]) > 0) by (table)",
"format": "time_series",
"instant": false,
"legendFormat": "{{table}}",
"range": true,
"refId": "A"
}
],
"title": "Max insertion operation time",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
@ -666,7 +1053,7 @@
"h": 8,
"w": 12,
"x": 0,
"y": 26
"y": 42
},
"id": 48,
"options": {
@ -776,7 +1163,7 @@
"h": 8,
"w": 12,
"x": 12,
"y": 26
"y": 42
},
"id": 52,
"options": {
@ -834,7 +1221,7 @@
"h": 8,
"w": 12,
"x": 0,
"y": 34
"y": 50
},
"id": 50,
"options": {
@ -1002,7 +1389,7 @@
"h": 8,
"w": 12,
"x": 12,
"y": 34
"y": 50
},
"id": 58,
"options": {
@ -1101,7 +1488,7 @@
"h": 8,
"w": 12,
"x": 0,
"y": 42
"y": 58
},
"id": 113,
"options": {
@ -1138,7 +1525,7 @@
"h": 1,
"w": 24,
"x": 0,
"y": 50
"y": 66
},
"id": 46,
"panels": [],
@ -1207,7 +1594,7 @@
"h": 8,
"w": 24,
"x": 0,
"y": 51
"y": 67
},
"id": 56,
"options": {
@ -1280,7 +1667,7 @@
"h": 1,
"w": 24,
"x": 0,
"y": 59
"y": 75
},
"id": 6,
"panels": [],
@ -1352,7 +1739,7 @@
"h": 8,
"w": 8,
"x": 0,
"y": 60
"y": 76
},
"id": 18,
"options": {
@ -1446,7 +1833,7 @@
"h": 8,
"w": 8,
"x": 8,
"y": 60
"y": 76
},
"id": 16,
"options": {
@ -1566,7 +1953,7 @@
"h": 8,
"w": 8,
"x": 16,
"y": 60
"y": 76
},
"id": 8,
"options": {
@ -1649,7 +2036,7 @@
"h": 8,
"w": 8,
"x": 0,
"y": 68
"y": 84
},
"id": 54,
"options": {
@ -1870,7 +2257,7 @@
"h": 8,
"w": 14,
"x": 8,
"y": 68
"y": 84
},
"id": 103,
"options": {
@ -1907,7 +2294,7 @@
"h": 1,
"w": 24,
"x": 0,
"y": 76
"y": 92
},
"id": 24,
"panels": [],
@ -2003,7 +2390,7 @@
"h": 8,
"w": 12,
"x": 0,
"y": 77
"y": 93
},
"id": 26,
"options": {
@ -2135,7 +2522,7 @@
"h": 8,
"w": 12,
"x": 12,
"y": 77
"y": 93
},
"id": 33,
"options": {
@ -2253,7 +2640,7 @@
"h": 8,
"w": 12,
"x": 0,
"y": 85
"y": 101
},
"id": 36,
"options": {
@ -2302,7 +2689,7 @@
"h": 1,
"w": 24,
"x": 0,
"y": 93
"y": 109
},
"id": 32,
"panels": [],
@ -2358,7 +2745,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@ -2407,7 +2795,7 @@
"h": 8,
"w": 12,
"x": 0,
"y": 94
"y": 110
},
"id": 30,
"options": {
@ -2558,7 +2946,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
}
]
},
@ -2570,7 +2959,7 @@
"h": 8,
"w": 12,
"x": 12,
"y": 94
"y": 110
},
"id": 28,
"options": {
@ -2687,7 +3076,7 @@
"h": 8,
"w": 12,
"x": 0,
"y": 102
"y": 118
},
"id": 35,
"options": {
@ -2810,7 +3199,7 @@
"h": 8,
"w": 12,
"x": 12,
"y": 102
"y": 118
},
"id": 73,
"options": {
@ -2860,7 +3249,7 @@
"h": 1,
"w": 24,
"x": 0,
"y": 110
"y": 126
},
"id": 89,
"panels": [],
@ -2932,7 +3321,7 @@
"h": 8,
"w": 12,
"x": 0,
"y": 111
"y": 127
},
"id": 91,
"options": {
@ -3049,7 +3438,7 @@
"h": 8,
"w": 12,
"x": 12,
"y": 111
"y": 127
},
"id": 92,
"options": {
@ -3184,7 +3573,7 @@
"h": 8,
"w": 12,
"x": 0,
"y": 119
"y": 135
},
"id": 102,
"options": {
@ -3303,7 +3692,7 @@
"h": 8,
"w": 12,
"x": 12,
"y": 119
"y": 135
},
"id": 94,
"options": {
@ -3397,7 +3786,7 @@
"h": 8,
"w": 12,
"x": 0,
"y": 127
"y": 143
},
"id": 104,
"options": {
@ -3521,7 +3910,7 @@
"h": 8,
"w": 12,
"x": 12,
"y": 127
"y": 143
},
"id": 93,
"options": {
@ -3664,7 +4053,7 @@
"h": 8,
"w": 12,
"x": 0,
"y": 135
"y": 151
},
"id": 95,
"options": {
@ -3783,7 +4172,7 @@
"h": 8,
"w": 12,
"x": 12,
"y": 135
"y": 151
},
"id": 115,
"options": {
@ -3876,7 +4265,7 @@
"h": 1,
"w": 24,
"x": 0,
"y": 143
"y": 159
},
"id": 79,
"panels": [],
@ -3947,7 +4336,7 @@
"h": 8,
"w": 12,
"x": 0,
"y": 144
"y": 160
},
"id": 74,
"options": {
@ -4041,7 +4430,7 @@
"h": 8,
"w": 12,
"x": 12,
"y": 144
"y": 160
},
"id": 80,
"options": {
@ -4135,7 +4524,7 @@
"h": 8,
"w": 12,
"x": 0,
"y": 152
"y": 168
},
"id": 81,
"options": {
@ -4229,7 +4618,7 @@
"h": 8,
"w": 12,
"x": 12,
"y": 152
"y": 168
},
"id": 114,
"options": {
@ -4267,7 +4656,7 @@
"h": 1,
"w": 24,
"x": 0,
"y": 160
"y": 176
},
"id": 87,
"panels": [],
@ -4338,7 +4727,7 @@
"h": 8,
"w": 12,
"x": 0,
"y": 161
"y": 177
},
"id": 83,
"options": {
@ -4431,7 +4820,7 @@
"h": 8,
"w": 12,
"x": 12,
"y": 161
"y": 177
},
"id": 84,
"options": {
@ -4536,7 +4925,7 @@
"h": 8,
"w": 12,
"x": 0,
"y": 169
"y": 185
},
"id": 85,
"options": {
@ -4573,7 +4962,7 @@
"h": 1,
"w": 24,
"x": 0,
"y": 177
"y": 193
},
"id": 68,
"panels": [],
@ -4644,7 +5033,7 @@
"h": 8,
"w": 12,
"x": 0,
"y": 178
"y": 194
},
"id": 60,
"options": {
@ -4737,7 +5126,7 @@
"h": 8,
"w": 12,
"x": 12,
"y": 178
"y": 194
},
"id": 62,
"options": {
@ -4830,7 +5219,7 @@
"h": 8,
"w": 12,
"x": 0,
"y": 186
"y": 202
},
"id": 64,
"options": {
@ -4867,7 +5256,7 @@
"h": 1,
"w": 24,
"x": 0,
"y": 194
"y": 210
},
"id": 97,
"panels": [],
@ -4936,7 +5325,7 @@
"h": 8,
"w": 12,
"x": 0,
"y": 195
"y": 211
},
"id": 98,
"options": {
@ -5096,7 +5485,7 @@
"h": 8,
"w": 12,
"x": 12,
"y": 195
"y": 211
},
"id": 101,
"options": {
@ -5191,7 +5580,7 @@
"h": 8,
"w": 12,
"x": 0,
"y": 203
"y": 219
},
"id": 99,
"options": {
@ -5286,7 +5675,7 @@
"h": 8,
"w": 12,
"x": 12,
"y": 203
"y": 219
},
"id": 100,
"options": {
@ -5324,7 +5713,7 @@
"h": 1,
"w": 24,
"x": 0,
"y": 211
"y": 227
},
"id": 105,
"panels": [],
@ -5394,7 +5783,7 @@
"h": 8,
"w": 12,
"x": 0,
"y": 212
"y": 228
},
"id": 106,
"options": {
@ -5489,7 +5878,7 @@
"h": 8,
"w": 12,
"x": 12,
"y": 212
"y": 228
},
"id": 107,
"options": {
@ -5527,7 +5916,7 @@
"h": 1,
"w": 24,
"x": 0,
"y": 220
"y": 236
},
"id": 108,
"panels": [],
@ -5550,7 +5939,7 @@
"h": 8,
"w": 12,
"x": 0,
"y": 221
"y": 237
},
"hiddenSeries": false,
"id": 109,
@ -5638,7 +6027,7 @@
"h": 8,
"w": 12,
"x": 12,
"y": 221
"y": 237
},
"hiddenSeries": false,
"id": 110,
@ -5735,7 +6124,7 @@
"h": 8,
"w": 12,
"x": 0,
"y": 229
"y": 245
},
"id": 111,
"maxDataPoints": 25,
@ -5824,7 +6213,7 @@
"h": 8,
"w": 12,
"x": 12,
"y": 229
"y": 245
},
"id": 112,
"maxDataPoints": 25,
@ -5928,6 +6317,6 @@
"timezone": "",
"title": "reth",
"uid": "2k8BXz24x",
"version": 10,
"version": 11,
"weekStart": ""
}