You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by xi...@apache.org on 2023/03/02 07:29:05 UTC
[iotdb] branch master updated: Add write metrics and dashboard (#9167)
This is an automated email from the ASF dual-hosted git repository.
xingtanzjr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new cf01cac60d Add write metrics and dashboard (#9167)
cf01cac60d is described below
commit cf01cac60dd02ed380c7fedcc9e59402ecbaca72
Author: shuwenwei <55...@users.noreply.github.com>
AuthorDate: Thu Mar 2 15:28:58 2023 +0800
Add write metrics and dashboard (#9167)
---
.../Apache-IoTDB-DataNode-Dashboard.json | 3661 ++++++++++++++++----
docs/UserGuide/Monitor-Alert/Metric-Tool.md | 28 +
.../iotdb/commons/service/metric/enums/Metric.java | 9 +
.../org/apache/iotdb/db/engine/StorageEngine.java | 6 +
.../iotdb/db/engine/flush/MemTableFlushTask.java | 37 +-
.../db/engine/storagegroup/TsFileProcessor.java | 4 +
.../db/service/metrics/DataNodeMetricsHelper.java | 1 +
.../iotdb/db/service/metrics/WritingMetrics.java | 245 ++
.../metrics/recorder/WritingMetricsManager.java | 351 ++
.../java/org/apache/iotdb/db/wal/WALManager.java | 7 +
.../iotdb/db/wal/allocation/ElasticStrategy.java | 6 +
.../db/wal/allocation/FirstCreateStrategy.java | 6 +
.../db/wal/allocation/NodeAllocationStrategy.java | 3 +
.../db/wal/allocation/RoundRobinStrategy.java | 6 +
.../org/apache/iotdb/db/wal/buffer/WALBuffer.java | 22 +-
.../iotdb/db/wal/checkpoint/CheckpointManager.java | 10 +
.../java/org/apache/iotdb/db/wal/node/WALNode.java | 10 +-
17 files changed, 3790 insertions(+), 622 deletions(-)
diff --git a/docs/UserGuide/Monitor-Alert/Apache-IoTDB-DataNode-Dashboard.json b/docs/UserGuide/Monitor-Alert/Apache-IoTDB-DataNode-Dashboard.json
index 2b5ac95dda..f68c898376 100644
--- a/docs/UserGuide/Monitor-Alert/Apache-IoTDB-DataNode-Dashboard.json
+++ b/docs/UserGuide/Monitor-Alert/Apache-IoTDB-DataNode-Dashboard.json
@@ -15,7 +15,7 @@
"type": "grafana",
"id": "grafana",
"name": "Grafana",
- "version": "9.3.1"
+ "version": "9.2.0"
},
{
"type": "datasource",
@@ -136,7 +136,7 @@
"h": 8,
"w": 8,
"x": 0,
- "y": 41
+ "y": 241
},
"id": 2,
"options": {
@@ -225,7 +225,7 @@
"h": 8,
"w": 8,
"x": 8,
- "y": 41
+ "y": 241
},
"id": 3,
"options": {
@@ -315,7 +315,7 @@
"h": 8,
"w": 8,
"x": 16,
- "y": 41
+ "y": 241
},
"id": 4,
"options": {
@@ -432,7 +432,7 @@
"h": 8,
"w": 8,
"x": 0,
- "y": 42
+ "y": 11
},
"id": 6,
"options": {
@@ -521,7 +521,7 @@
"h": 8,
"w": 8,
"x": 8,
- "y": 42
+ "y": 11
},
"id": 55,
"options": {
@@ -610,7 +610,7 @@
"h": 8,
"w": 8,
"x": 16,
- "y": 42
+ "y": 11
},
"id": 56,
"options": {
@@ -699,7 +699,7 @@
"h": 8,
"w": 8,
"x": 0,
- "y": 50
+ "y": 19
},
"id": 9,
"options": {
@@ -789,7 +789,7 @@
"h": 8,
"w": 8,
"x": 8,
- "y": 50
+ "y": 19
},
"id": 10,
"options": {
@@ -881,7 +881,7 @@
"h": 8,
"w": 8,
"x": 16,
- "y": 50
+ "y": 19
},
"id": 11,
"options": {
@@ -981,7 +981,7 @@
"h": 8,
"w": 8,
"x": 0,
- "y": 58
+ "y": 27
},
"id": 12,
"options": {
@@ -1069,7 +1069,7 @@
"h": 8,
"w": 8,
"x": 8,
- "y": 58
+ "y": 27
},
"id": 13,
"options": {
@@ -1185,7 +1185,7 @@
"h": 8,
"w": 12,
"x": 0,
- "y": 3
+ "y": 4
},
"id": 15,
"options": {
@@ -1275,7 +1275,7 @@
"h": 8,
"w": 12,
"x": 12,
- "y": 3
+ "y": 4
},
"id": 16,
"options": {
@@ -1365,7 +1365,7 @@
"h": 8,
"w": 8,
"x": 0,
- "y": 11
+ "y": 12
},
"id": 17,
"options": {
@@ -1467,7 +1467,7 @@
"h": 8,
"w": 8,
"x": 8,
- "y": 11
+ "y": 12
},
"id": 18,
"options": {
@@ -1557,7 +1557,7 @@
"h": 8,
"w": 8,
"x": 16,
- "y": 11
+ "y": 12
},
"id": 19,
"options": {
@@ -1674,7 +1674,7 @@
"h": 8,
"w": 12,
"x": 0,
- "y": 19
+ "y": 20
},
"id": 169,
"options": {
@@ -1797,7 +1797,7 @@
"h": 8,
"w": 12,
"x": 12,
- "y": 19
+ "y": 20
},
"id": 171,
"options": {
@@ -1912,7 +1912,7 @@
"h": 8,
"w": 6,
"x": 0,
- "y": 4
+ "y": 204
},
"id": 80,
"options": {
@@ -2000,7 +2000,7 @@
"h": 8,
"w": 6,
"x": 6,
- "y": 4
+ "y": 204
},
"id": 60,
"options": {
@@ -2088,7 +2088,7 @@
"h": 8,
"w": 6,
"x": 12,
- "y": 4
+ "y": 204
},
"id": 61,
"options": {
@@ -2176,7 +2176,7 @@
"h": 8,
"w": 6,
"x": 18,
- "y": 4
+ "y": 204
},
"id": 62,
"options": {
@@ -2264,7 +2264,7 @@
"h": 8,
"w": 6,
"x": 0,
- "y": 12
+ "y": 212
},
"id": 63,
"options": {
@@ -2352,7 +2352,7 @@
"h": 8,
"w": 6,
"x": 6,
- "y": 12
+ "y": 212
},
"id": 81,
"options": {
@@ -2440,7 +2440,7 @@
"h": 8,
"w": 6,
"x": 12,
- "y": 12
+ "y": 212
},
"id": 64,
"options": {
@@ -2528,7 +2528,7 @@
"h": 8,
"w": 6,
"x": 18,
- "y": 12
+ "y": 212
},
"id": 65,
"options": {
@@ -2616,7 +2616,7 @@
"h": 8,
"w": 6,
"x": 0,
- "y": 20
+ "y": 220
},
"id": 83,
"options": {
@@ -2704,7 +2704,7 @@
"h": 8,
"w": 6,
"x": 6,
- "y": 20
+ "y": 220
},
"id": 66,
"options": {
@@ -2792,7 +2792,7 @@
"h": 8,
"w": 6,
"x": 12,
- "y": 20
+ "y": 220
},
"id": 67,
"options": {
@@ -2880,7 +2880,7 @@
"h": 8,
"w": 6,
"x": 18,
- "y": 20
+ "y": 220
},
"id": 68,
"options": {
@@ -2968,7 +2968,7 @@
"h": 8,
"w": 6,
"x": 0,
- "y": 28
+ "y": 228
},
"id": 82,
"options": {
@@ -3056,7 +3056,7 @@
"h": 8,
"w": 6,
"x": 6,
- "y": 28
+ "y": 228
},
"id": 69,
"options": {
@@ -3144,7 +3144,7 @@
"h": 8,
"w": 6,
"x": 12,
- "y": 28
+ "y": 228
},
"id": 70,
"options": {
@@ -3232,7 +3232,7 @@
"h": 8,
"w": 6,
"x": 18,
- "y": 28
+ "y": 228
},
"id": 71,
"options": {
@@ -3320,7 +3320,7 @@
"h": 8,
"w": 6,
"x": 0,
- "y": 36
+ "y": 236
},
"id": 72,
"options": {
@@ -3408,7 +3408,7 @@
"h": 8,
"w": 6,
"x": 6,
- "y": 36
+ "y": 236
},
"id": 84,
"options": {
@@ -3496,7 +3496,7 @@
"h": 8,
"w": 6,
"x": 12,
- "y": 36
+ "y": 236
},
"id": 73,
"options": {
@@ -3584,7 +3584,7 @@
"h": 8,
"w": 6,
"x": 18,
- "y": 36
+ "y": 236
},
"id": 74,
"options": {
@@ -3672,7 +3672,7 @@
"h": 8,
"w": 6,
"x": 0,
- "y": 44
+ "y": 244
},
"id": 131,
"options": {
@@ -3761,7 +3761,7 @@
"h": 8,
"w": 6,
"x": 6,
- "y": 44
+ "y": 244
},
"id": 132,
"options": {
@@ -3850,7 +3850,7 @@
"h": 8,
"w": 6,
"x": 12,
- "y": 44
+ "y": 244
},
"id": 133,
"options": {
@@ -3940,7 +3940,7 @@
"h": 8,
"w": 6,
"x": 18,
- "y": 44
+ "y": 244
},
"id": 134,
"options": {
@@ -4029,7 +4029,7 @@
"h": 8,
"w": 6,
"x": 0,
- "y": 52
+ "y": 252
},
"id": 76,
"options": {
@@ -4117,7 +4117,7 @@
"h": 8,
"w": 6,
"x": 6,
- "y": 52
+ "y": 252
},
"id": 128,
"options": {
@@ -4205,7 +4205,7 @@
"h": 8,
"w": 6,
"x": 12,
- "y": 52
+ "y": 252
},
"id": 129,
"options": {
@@ -4293,7 +4293,7 @@
"h": 8,
"w": 6,
"x": 18,
- "y": 52
+ "y": 252
},
"id": 130,
"options": {
@@ -4381,7 +4381,7 @@
"h": 8,
"w": 6,
"x": 0,
- "y": 60
+ "y": 260
},
"id": 135,
"options": {
@@ -4469,7 +4469,7 @@
"h": 8,
"w": 6,
"x": 6,
- "y": 60
+ "y": 260
},
"id": 136,
"options": {
@@ -4557,7 +4557,7 @@
"h": 8,
"w": 6,
"x": 12,
- "y": 60
+ "y": 260
},
"id": 137,
"options": {
@@ -4645,7 +4645,7 @@
"h": 8,
"w": 6,
"x": 18,
- "y": 60
+ "y": 260
},
"id": 138,
"options": {
@@ -4733,7 +4733,7 @@
"h": 8,
"w": 8,
"x": 0,
- "y": 68
+ "y": 268
},
"id": 139,
"options": {
@@ -4821,7 +4821,7 @@
"h": 8,
"w": 8,
"x": 8,
- "y": 68
+ "y": 268
},
"id": 140,
"options": {
@@ -4909,7 +4909,7 @@
"h": 8,
"w": 8,
"x": 16,
- "y": 68
+ "y": 268
},
"id": 167,
"options": {
@@ -4998,7 +4998,7 @@
"h": 8,
"w": 6,
"x": 0,
- "y": 76
+ "y": 276
},
"id": 163,
"options": {
@@ -5087,7 +5087,7 @@
"h": 8,
"w": 6,
"x": 6,
- "y": 76
+ "y": 276
},
"id": 164,
"options": {
@@ -5176,7 +5176,7 @@
"h": 8,
"w": 6,
"x": 12,
- "y": 76
+ "y": 276
},
"id": 165,
"options": {
@@ -5265,7 +5265,7 @@
"h": 8,
"w": 6,
"x": 18,
- "y": 76
+ "y": 276
},
"id": 166,
"options": {
@@ -5381,7 +5381,7 @@
"h": 8,
"w": 6,
"x": 0,
- "y": 5
+ "y": 205
},
"id": 75,
"options": {
@@ -5469,7 +5469,7 @@
"h": 8,
"w": 6,
"x": 6,
- "y": 5
+ "y": 205
},
"id": 85,
"options": {
@@ -5557,7 +5557,7 @@
"h": 8,
"w": 6,
"x": 12,
- "y": 5
+ "y": 205
},
"id": 77,
"options": {
@@ -5645,7 +5645,7 @@
"h": 8,
"w": 6,
"x": 18,
- "y": 5
+ "y": 205
},
"id": 78,
"options": {
@@ -5733,7 +5733,7 @@
"h": 8,
"w": 6,
"x": 0,
- "y": 13
+ "y": 213
},
"id": 86,
"options": {
@@ -5821,7 +5821,7 @@
"h": 8,
"w": 6,
"x": 6,
- "y": 13
+ "y": 213
},
"id": 87,
"options": {
@@ -5909,7 +5909,7 @@
"h": 8,
"w": 6,
"x": 12,
- "y": 13
+ "y": 213
},
"id": 88,
"options": {
@@ -5997,7 +5997,7 @@
"h": 8,
"w": 6,
"x": 18,
- "y": 13
+ "y": 213
},
"id": 89,
"options": {
@@ -6085,7 +6085,7 @@
"h": 8,
"w": 6,
"x": 0,
- "y": 21
+ "y": 221
},
"id": 90,
"options": {
@@ -6173,7 +6173,7 @@
"h": 8,
"w": 6,
"x": 6,
- "y": 21
+ "y": 221
},
"id": 91,
"options": {
@@ -6261,7 +6261,7 @@
"h": 8,
"w": 6,
"x": 12,
- "y": 21
+ "y": 221
},
"id": 92,
"options": {
@@ -6349,7 +6349,7 @@
"h": 8,
"w": 6,
"x": 18,
- "y": 21
+ "y": 221
},
"id": 93,
"options": {
@@ -6437,7 +6437,7 @@
"h": 8,
"w": 6,
"x": 0,
- "y": 29
+ "y": 229
},
"id": 94,
"options": {
@@ -6525,7 +6525,7 @@
"h": 8,
"w": 6,
"x": 6,
- "y": 29
+ "y": 229
},
"id": 95,
"options": {
@@ -6613,7 +6613,7 @@
"h": 8,
"w": 6,
"x": 12,
- "y": 29
+ "y": 229
},
"id": 96,
"options": {
@@ -6701,7 +6701,7 @@
"h": 8,
"w": 6,
"x": 18,
- "y": 29
+ "y": 229
},
"id": 97,
"options": {
@@ -6789,7 +6789,7 @@
"h": 8,
"w": 6,
"x": 0,
- "y": 37
+ "y": 237
},
"id": 98,
"options": {
@@ -6878,7 +6878,7 @@
"h": 8,
"w": 6,
"x": 6,
- "y": 37
+ "y": 237
},
"id": 101,
"options": {
@@ -6967,7 +6967,7 @@
"h": 8,
"w": 6,
"x": 12,
- "y": 37
+ "y": 237
},
"id": 102,
"options": {
@@ -7056,7 +7056,7 @@
"h": 8,
"w": 6,
"x": 18,
- "y": 37
+ "y": 237
},
"id": 103,
"options": {
@@ -7144,7 +7144,7 @@
"h": 8,
"w": 6,
"x": 0,
- "y": 45
+ "y": 245
},
"id": 104,
"options": {
@@ -7233,7 +7233,7 @@
"h": 8,
"w": 6,
"x": 6,
- "y": 45
+ "y": 245
},
"id": 105,
"options": {
@@ -7322,7 +7322,7 @@
"h": 8,
"w": 6,
"x": 12,
- "y": 45
+ "y": 245
},
"id": 106,
"options": {
@@ -7411,7 +7411,7 @@
"h": 8,
"w": 6,
"x": 18,
- "y": 45
+ "y": 245
},
"id": 107,
"options": {
@@ -7499,7 +7499,7 @@
"h": 8,
"w": 6,
"x": 0,
- "y": 53
+ "y": 253
},
"id": 108,
"options": {
@@ -7588,7 +7588,7 @@
"h": 8,
"w": 6,
"x": 6,
- "y": 53
+ "y": 253
},
"id": 109,
"options": {
@@ -7677,7 +7677,7 @@
"h": 8,
"w": 6,
"x": 12,
- "y": 53
+ "y": 253
},
"id": 110,
"options": {
@@ -7766,7 +7766,7 @@
"h": 8,
"w": 6,
"x": 18,
- "y": 53
+ "y": 253
},
"id": 111,
"options": {
@@ -7852,7 +7852,7 @@
"h": 8,
"w": 6,
"x": 0,
- "y": 61
+ "y": 261
},
"id": 112,
"options": {
@@ -7939,7 +7939,7 @@
"h": 8,
"w": 6,
"x": 6,
- "y": 61
+ "y": 261
},
"id": 113,
"options": {
@@ -8026,7 +8026,7 @@
"h": 8,
"w": 6,
"x": 12,
- "y": 61
+ "y": 261
},
"id": 114,
"options": {
@@ -8113,7 +8113,7 @@
"h": 8,
"w": 6,
"x": 18,
- "y": 61
+ "y": 261
},
"id": 115,
"options": {
@@ -8199,7 +8199,7 @@
"h": 8,
"w": 6,
"x": 0,
- "y": 69
+ "y": 269
},
"id": 116,
"options": {
@@ -8286,7 +8286,7 @@
"h": 8,
"w": 6,
"x": 6,
- "y": 69
+ "y": 269
},
"id": 117,
"options": {
@@ -8373,7 +8373,7 @@
"h": 8,
"w": 6,
"x": 12,
- "y": 69
+ "y": 269
},
"id": 118,
"options": {
@@ -8460,7 +8460,7 @@
"h": 8,
"w": 6,
"x": 18,
- "y": 69
+ "y": 269
},
"id": 119,
"options": {
@@ -8546,7 +8546,7 @@
"h": 8,
"w": 6,
"x": 0,
- "y": 77
+ "y": 277
},
"id": 120,
"options": {
@@ -8633,7 +8633,7 @@
"h": 8,
"w": 6,
"x": 6,
- "y": 77
+ "y": 277
},
"id": 121,
"options": {
@@ -8720,7 +8720,7 @@
"h": 8,
"w": 6,
"x": 12,
- "y": 77
+ "y": 277
},
"id": 122,
"options": {
@@ -8807,7 +8807,7 @@
"h": 8,
"w": 6,
"x": 18,
- "y": 77
+ "y": 277
},
"id": 123,
"options": {
@@ -8893,7 +8893,7 @@
"h": 8,
"w": 6,
"x": 0,
- "y": 85
+ "y": 285
},
"id": 124,
"options": {
@@ -8980,7 +8980,7 @@
"h": 8,
"w": 6,
"x": 6,
- "y": 85
+ "y": 285
},
"id": 125,
"options": {
@@ -9067,7 +9067,7 @@
"h": 8,
"w": 6,
"x": 12,
- "y": 85
+ "y": 285
},
"id": 126,
"options": {
@@ -9154,7 +9154,7 @@
"h": 8,
"w": 6,
"x": 18,
- "y": 85
+ "y": 285
},
"id": 127,
"options": {
@@ -9269,7 +9269,7 @@
"h": 8,
"w": 6,
"x": 0,
- "y": 6
+ "y": 206
},
"id": 143,
"options": {
@@ -9357,7 +9357,7 @@
"h": 8,
"w": 6,
"x": 6,
- "y": 6
+ "y": 206
},
"id": 144,
"options": {
@@ -9445,7 +9445,7 @@
"h": 8,
"w": 6,
"x": 12,
- "y": 6
+ "y": 206
},
"id": 145,
"options": {
@@ -9533,7 +9533,7 @@
"h": 8,
"w": 6,
"x": 18,
- "y": 6
+ "y": 206
},
"id": 146,
"options": {
@@ -9621,7 +9621,7 @@
"h": 8,
"w": 6,
"x": 0,
- "y": 14
+ "y": 214
},
"id": 147,
"options": {
@@ -9709,7 +9709,7 @@
"h": 8,
"w": 6,
"x": 6,
- "y": 14
+ "y": 214
},
"id": 148,
"options": {
@@ -9797,7 +9797,7 @@
"h": 8,
"w": 6,
"x": 12,
- "y": 14
+ "y": 214
},
"id": 149,
"options": {
@@ -9885,7 +9885,7 @@
"h": 8,
"w": 6,
"x": 18,
- "y": 14
+ "y": 214
},
"id": 150,
"options": {
@@ -9973,7 +9973,7 @@
"h": 8,
"w": 6,
"x": 0,
- "y": 22
+ "y": 222
},
"id": 151,
"options": {
@@ -10061,7 +10061,7 @@
"h": 8,
"w": 6,
"x": 6,
- "y": 22
+ "y": 222
},
"id": 152,
"options": {
@@ -10149,7 +10149,7 @@
"h": 8,
"w": 6,
"x": 12,
- "y": 22
+ "y": 222
},
"id": 153,
"options": {
@@ -10237,7 +10237,7 @@
"h": 8,
"w": 6,
"x": 18,
- "y": 22
+ "y": 222
},
"id": 154,
"options": {
@@ -10325,7 +10325,7 @@
"h": 8,
"w": 6,
"x": 0,
- "y": 30
+ "y": 230
},
"id": 155,
"options": {
@@ -10413,7 +10413,7 @@
"h": 8,
"w": 6,
"x": 6,
- "y": 30
+ "y": 230
},
"id": 156,
"options": {
@@ -10501,7 +10501,7 @@
"h": 8,
"w": 6,
"x": 12,
- "y": 30
+ "y": 230
},
"id": 157,
"options": {
@@ -10589,7 +10589,7 @@
"h": 8,
"w": 6,
"x": 18,
- "y": 30
+ "y": 230
},
"id": 158,
"options": {
@@ -10677,7 +10677,7 @@
"h": 8,
"w": 6,
"x": 0,
- "y": 38
+ "y": 238
},
"id": 159,
"options": {
@@ -10765,7 +10765,7 @@
"h": 8,
"w": 6,
"x": 6,
- "y": 38
+ "y": 238
},
"id": 160,
"options": {
@@ -10853,7 +10853,7 @@
"h": 8,
"w": 6,
"x": 12,
- "y": 38
+ "y": 238
},
"id": 161,
"options": {
@@ -10941,7 +10941,7 @@
"h": 8,
"w": 6,
"x": 18,
- "y": 38
+ "y": 238
},
"id": 162,
"options": {
@@ -11056,7 +11056,7 @@
"h": 8,
"w": 8,
"x": 0,
- "y": 7
+ "y": 207
},
"id": 21,
"options": {
@@ -11174,7 +11174,7 @@
"h": 8,
"w": 8,
"x": 8,
- "y": 7
+ "y": 207
},
"id": 22,
"options": {
@@ -11265,7 +11265,7 @@
"h": 8,
"w": 8,
"x": 16,
- "y": 7
+ "y": 207
},
"id": 23,
"options": {
@@ -11371,7 +11371,7 @@
"h": 8,
"w": 8,
"x": 0,
- "y": 15
+ "y": 215
},
"id": 24,
"options": {
@@ -11492,7 +11492,7 @@
"h": 8,
"w": 8,
"x": 8,
- "y": 15
+ "y": 215
},
"id": 25,
"options": {
@@ -11608,7 +11608,7 @@
"h": 8,
"w": 8,
"x": 16,
- "y": 15
+ "y": 215
},
"id": 26,
"options": {
@@ -11698,7 +11698,7 @@
"h": 8,
"w": 8,
"x": 0,
- "y": 23
+ "y": 223
},
"id": 27,
"options": {
@@ -11788,7 +11788,7 @@
"h": 8,
"w": 8,
"x": 8,
- "y": 23
+ "y": 223
},
"id": 175,
"options": {
@@ -11878,7 +11878,7 @@
"h": 8,
"w": 8,
"x": 16,
- "y": 23
+ "y": 223
},
"id": 29,
"options": {
@@ -11969,7 +11969,7 @@
"h": 8,
"w": 8,
"x": 0,
- "y": 31
+ "y": 231
},
"id": 30,
"options": {
@@ -12062,7 +12062,7 @@
"h": 8,
"w": 8,
"x": 8,
- "y": 31
+ "y": 231
},
"id": 31,
"options": {
@@ -12156,7 +12156,7 @@
"h": 8,
"w": 8,
"x": 16,
- "y": 31
+ "y": 231
},
"id": 32,
"options": {
@@ -12249,7 +12249,7 @@
"h": 8,
"w": 8,
"x": 0,
- "y": 39
+ "y": 239
},
"id": 28,
"options": {
@@ -12339,7 +12339,7 @@
"h": 8,
"w": 8,
"x": 8,
- "y": 39
+ "y": 239
},
"id": 173,
"options": {
@@ -12426,7 +12426,7 @@
"h": 8,
"w": 8,
"x": 0,
- "y": 16
+ "y": 17
},
"id": 34,
"options": {
@@ -12443,7 +12443,7 @@
},
"textMode": "auto"
},
- "pluginVersion": "9.3.1",
+ "pluginVersion": "9.3.6",
"targets": [
{
"datasource": {
@@ -12521,7 +12521,7 @@
"h": 8,
"w": 8,
"x": 8,
- "y": 16
+ "y": 17
},
"id": 35,
"options": {
@@ -12625,7 +12625,7 @@
"h": 8,
"w": 8,
"x": 16,
- "y": 16
+ "y": 17
},
"id": 40,
"options": {
@@ -12717,7 +12717,7 @@
"h": 8,
"w": 8,
"x": 0,
- "y": 24
+ "y": 25
},
"id": 41,
"options": {
@@ -12833,7 +12833,7 @@
"h": 8,
"w": 8,
"x": 8,
- "y": 24
+ "y": 25
},
"id": 42,
"options": {
@@ -12937,7 +12937,7 @@
"h": 8,
"w": 8,
"x": 16,
- "y": 24
+ "y": 25
},
"id": 43,
"options": {
@@ -13051,7 +13051,7 @@
"h": 8,
"w": 8,
"x": 0,
- "y": 32
+ "y": 33
},
"id": 44,
"options": {
@@ -13175,7 +13175,7 @@
"h": 8,
"w": 8,
"x": 8,
- "y": 32
+ "y": 33
},
"id": 45,
"options": {
@@ -13276,7 +13276,7 @@
"h": 8,
"w": 8,
"x": 16,
- "y": 32
+ "y": 33
},
"id": 46,
"options": {
@@ -13379,7 +13379,7 @@
"h": 7,
"w": 8,
"x": 0,
- "y": 40
+ "y": 41
},
"id": 47,
"options": {
@@ -13481,7 +13481,7 @@
"h": 7,
"w": 8,
"x": 8,
- "y": 40
+ "y": 41
},
"id": 48,
"options": {
@@ -13580,7 +13580,7 @@
"h": 7,
"w": 8,
"x": 16,
- "y": 40
+ "y": 41
},
"id": 49,
"options": {
@@ -13680,7 +13680,7 @@
"h": 8,
"w": 8,
"x": 0,
- "y": 47
+ "y": 48
},
"id": 50,
"options": {
@@ -13816,7 +13816,7 @@
"h": 8,
"w": 8,
"x": 8,
- "y": 47
+ "y": 48
},
"id": 51,
"options": {
@@ -13950,7 +13950,7 @@
"h": 8,
"w": 8,
"x": 16,
- "y": 47
+ "y": 48
},
"id": 52,
"options": {
@@ -14041,7 +14041,7 @@
"h": 8,
"w": 8,
"x": 0,
- "y": 55
+ "y": 56
},
"id": 53,
"options": {
@@ -14132,7 +14132,7 @@
"h": 8,
"w": 8,
"x": 8,
- "y": 55
+ "y": 56
},
"id": 54,
"options": {
@@ -14271,7 +14271,7 @@
"h": 8,
"w": 12,
"x": 0,
- "y": 87
+ "y": 287
},
"id": 179,
"options": {
@@ -14362,7 +14362,7 @@
"h": 8,
"w": 12,
"x": 12,
- "y": 87
+ "y": 287
},
"id": 181,
"options": {
@@ -14453,7 +14453,7 @@
"h": 8,
"w": 12,
"x": 0,
- "y": 95
+ "y": 295
},
"id": 183,
"options": {
@@ -14546,7 +14546,7 @@
"h": 8,
"w": 12,
"x": 12,
- "y": 95
+ "y": 295
},
"id": 185,
"options": {
@@ -14635,7 +14635,7 @@
"h": 8,
"w": 8,
"x": 0,
- "y": 103
+ "y": 303
},
"id": 187,
"options": {
@@ -14728,7 +14728,7 @@
"h": 8,
"w": 8,
"x": 8,
- "y": 103
+ "y": 303
},
"id": 189,
"options": {
@@ -14819,7 +14819,7 @@
"h": 8,
"w": 8,
"x": 16,
- "y": 103
+ "y": 303
},
"id": 193,
"options": {
@@ -14913,7 +14913,7 @@
"h": 8,
"w": 12,
"x": 0,
- "y": 111
+ "y": 311
},
"id": 191,
"options": {
@@ -15003,7 +15003,7 @@
"h": 8,
"w": 12,
"x": 12,
- "y": 111
+ "y": 311
},
"id": 195,
"options": {
@@ -15050,7 +15050,7 @@
"type": "row"
},
{
- "collapsed": false,
+ "collapsed": true,
"gridPos": {
"h": 1,
"w": 24,
@@ -15058,171 +15058,2469 @@
"y": 9
},
"id": 197,
- "panels": [],
- "title": "Schema Engine",
- "type": "row"
- },
- {
- "datasource": {
- "type": "prometheus",
- "uid": "${DS_PROMETHEUS}"
- },
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
+ "panels": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${DS_PROMETHEUS}"
},
- "mappings": [
- {
- "options": {
- "0": {
- "index": 0,
- "text": "Memory"
- },
- "1": {
- "index": 1,
- "text": "Schema_File"
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "thresholds"
+ },
+ "mappings": [
+ {
+ "options": {
+ "0": {
+ "index": 0,
+ "text": "Memory"
+ },
+ "1": {
+ "index": 1,
+ "text": "Schema_File"
+ }
+ },
+ "type": "value"
}
+ ],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green"
+ }
+ ]
},
- "type": "value"
- }
- ],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- }
- ]
+ "unit": "none"
+ },
+ "overrides": []
},
- "unit": "none"
- },
- "overrides": []
- },
- "gridPos": {
- "h": 4,
- "w": 4,
- "x": 0,
- "y": 10
- },
- "id": 224,
- "options": {
- "colorMode": "value",
- "graphMode": "none",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
+ "gridPos": {
+ "h": 4,
+ "w": 4,
+ "x": 0,
+ "y": 19
+ },
+ "id": 224,
+ "options": {
+ "colorMode": "value",
+ "graphMode": "none",
+ "justifyMode": "auto",
+ "orientation": "auto",
+ "reduceOptions": {
+ "calcs": [
+ "lastNotNull"
+ ],
+ "fields": "",
+ "values": false
+ },
+ "textMode": "value"
+ },
+ "pluginVersion": "9.3.6",
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${DS_PROMETHEUS}"
+ },
+ "editorMode": "code",
+ "exemplar": false,
+ "expr": "schema_engine{name=\"schema_engine_mode\",instance=~\"$instance\"}",
+ "instant": false,
+ "legendFormat": "{{name}}",
+ "range": true,
+ "refId": "A"
+ }
],
- "fields": "",
- "values": false
+ "title": "Schema Engine Mode",
+ "type": "stat"
},
- "textMode": "value"
- },
- "pluginVersion": "9.3.1",
- "targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
- "editorMode": "code",
- "exemplar": false,
- "expr": "schema_engine{name=\"schema_engine_mode\",instance=~\"$instance\"}",
- "instant": false,
- "legendFormat": "{{name}}",
- "range": true,
- "refId": "A"
- }
- ],
- "title": "Schema Engine Mode",
- "type": "stat"
- },
- {
- "datasource": {
- "type": "prometheus",
- "uid": "${DS_PROMETHEUS}"
- },
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "thresholds"
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green"
+ }
+ ]
+ },
+ "unit": "none"
+ },
+ "overrides": []
},
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- }
- ]
+ "gridPos": {
+ "h": 4,
+ "w": 4,
+ "x": 4,
+ "y": 19
},
- "unit": "none"
- },
- "overrides": []
- },
- "gridPos": {
- "h": 4,
- "w": 4,
- "x": 4,
- "y": 10
- },
- "id": 219,
- "options": {
- "colorMode": "value",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
+ "id": 219,
+ "options": {
+ "colorMode": "value",
+ "graphMode": "area",
+ "justifyMode": "auto",
+ "orientation": "auto",
+ "reduceOptions": {
+ "calcs": [
+ "lastNotNull"
+ ],
+ "fields": "",
+ "values": false
+ },
+ "textMode": "value"
+ },
+ "pluginVersion": "9.3.6",
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${DS_PROMETHEUS}"
+ },
+ "editorMode": "code",
+ "exemplar": false,
+ "expr": "schema_engine{name=\"schema_region_number\",instance=~\"$instance\"}",
+ "instant": false,
+ "legendFormat": "{{name}}",
+ "range": true,
+ "refId": "A"
+ }
],
- "fields": "",
- "values": false
+ "title": "Schema Region Number",
+ "type": "stat"
},
- "textMode": "value"
- },
- "pluginVersion": "9.3.1",
- "targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
- "editorMode": "code",
- "exemplar": false,
- "expr": "schema_engine{name=\"schema_region_number\",instance=~\"$instance\"}",
- "instant": false,
- "legendFormat": "{{name}}",
- "range": true,
- "refId": "A"
- }
- ],
- "title": "Schema Region Number",
- "type": "stat"
- },
- {
- "datasource": {
- "type": "prometheus",
- "uid": "${DS_PROMETHEUS}"
- },
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "continuous-BlPu"
- },
- "custom": {
- "axisCenteredZero": false,
- "axisColorMode": "text",
- "axisLabel": "",
- "axisPlacement": "auto",
- "barAlignment": 0,
- "drawStyle": "line",
- "fillOpacity": 4,
- "gradientMode": "none",
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "continuous-BlPu"
+ },
+ "custom": {
+ "axisCenteredZero": false,
+ "axisColorMode": "text",
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 4,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 1,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "auto",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green"
+ }
+ ]
+ },
+ "unit": "bytes"
+ },
+ "overrides": [
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "schema_file_flush_threshold"
+ },
+ "properties": [
+ {
+ "id": "color",
+ "value": {
+ "fixedColor": "orange",
+ "mode": "fixed"
+ }
+ },
+ {
+ "id": "custom.fillOpacity",
+ "value": 0
+ }
+ ]
+ },
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "schema_file_release_threshold"
+ },
+ "properties": [
+ {
+ "id": "color",
+ "value": {
+ "fixedColor": "yellow",
+ "mode": "fixed"
+ }
+ },
+ {
+ "id": "custom.fillOpacity",
+ "value": 0
+ }
+ ]
+ },
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "schema_region_mem_capacity"
+ },
+ "properties": [
+ {
+ "id": "color",
+ "value": {
+ "fixedColor": "red",
+ "mode": "fixed"
+ }
+ },
+ {
+ "id": "custom.fillOpacity",
+ "value": 0
+ }
+ ]
+ }
+ ]
+ },
+ "gridPos": {
+ "h": 8,
+ "w": 16,
+ "x": 8,
+ "y": 19
+ },
+ "id": 217,
+ "options": {
+ "legend": {
+ "calcs": [],
+ "displayMode": "list",
+ "placement": "right",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "single",
+ "sort": "none"
+ }
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${DS_PROMETHEUS}"
+ },
+ "editorMode": "code",
+ "expr": "schema_engine{name=~\"schema_region_total_mem_usage|schema_region_mem_capacity|schema_file_release_threshold|schema_file_flush_threshold|schema_file_pinned_mem|schema_file_unpinned_mem\",instance=~\"$instance\"}",
+ "legendFormat": "{{name}}",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "Schema Region Memory Overview",
+ "type": "timeseries"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${DS_PROMETHEUS}"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "thresholds"
+ },
+ "mappings": [
+ {
+ "options": {
+ "0": {
+ "index": 0,
+ "text": "RatisConsensus"
+ },
+ "1": {
+ "index": 1,
+ "text": "SimpleConsensus"
+ }
+ },
+ "type": "value"
+ }
+ ],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green"
+ }
+ ]
+ },
+ "unit": "none"
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 4,
+ "w": 4,
+ "x": 0,
+ "y": 23
+ },
+ "id": 225,
+ "options": {
+ "colorMode": "value",
+ "graphMode": "none",
+ "justifyMode": "auto",
+ "orientation": "auto",
+ "reduceOptions": {
+ "calcs": [
+ "lastNotNull"
+ ],
+ "fields": "",
+ "values": false
+ },
+ "textMode": "value"
+ },
+ "pluginVersion": "9.3.6",
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${DS_PROMETHEUS}"
+ },
+ "editorMode": "code",
+ "exemplar": false,
+ "expr": "schema_engine{name=\"schema_region_consensus\",instance=~\"$instance\"}",
+ "instant": false,
+ "legendFormat": "{{name}}",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "Schema Consensus Protocol",
+ "type": "stat"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${DS_PROMETHEUS}"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "thresholds"
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green"
+ }
+ ]
+ },
+ "unit": "none"
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 4,
+ "w": 4,
+ "x": 4,
+ "y": 23
+ },
+ "id": 222,
+ "options": {
+ "colorMode": "value",
+ "graphMode": "area",
+ "justifyMode": "auto",
+ "orientation": "auto",
+ "reduceOptions": {
+ "calcs": [
+ "lastNotNull"
+ ],
+ "fields": "",
+ "values": false
+ },
+ "textMode": "value"
+ },
+ "pluginVersion": "9.3.6",
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${DS_PROMETHEUS}"
+ },
+ "editorMode": "code",
+ "exemplar": false,
+ "expr": "quantity{name=\"timeSeries\",instance=~\"$instance\"}",
+ "instant": false,
+ "legendFormat": "{{name}}",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "Time Series Number",
+ "type": "stat"
+ },
+ {
+ "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
+ },
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 1,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "auto",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green"
+ },
+ {
+ "color": "red",
+ "value": 80
+ }
+ ]
+ }
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 7,
+ "w": 12,
+ "x": 0,
+ "y": 27
+ },
+ "id": 215,
+ "options": {
+ "legend": {
+ "calcs": [],
+ "displayMode": "list",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "single",
+ "sort": "none"
+ }
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${DS_PROMETHEUS}"
+ },
+ "editorMode": "code",
+ "expr": "schema_region{name=\"schema_region_series_cnt\",instance=~\"$instance\"}",
+ "legendFormat": "{{region}}",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "Timeseries Count per SchemaRegion",
+ "type": "timeseries"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${DS_PROMETHEUS}"
+ },
+ "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
+ },
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 1,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "auto",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green"
+ },
+ {
+ "color": "red",
+ "value": 80
+ }
+ ]
+ },
+ "unit": "bytes"
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 7,
+ "w": 12,
+ "x": 12,
+ "y": 27
+ },
+ "id": 213,
+ "options": {
+ "legend": {
+ "calcs": [],
+ "displayMode": "list",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "single",
+ "sort": "none"
+ }
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${DS_PROMETHEUS}"
+ },
+ "editorMode": "code",
+ "expr": "schema_region{name=\"schema_region_mem_usage\",instance=~\"$instance\"}",
+ "legendFormat": "{{region}}",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "Memory Usgae per SchemaRegion",
+ "type": "timeseries"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${DS_PROMETHEUS}"
+ },
+ "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
+ },
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 1,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "auto",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green"
+ },
+ {
+ "color": "red",
+ "value": 80
+ }
+ ]
+ }
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 7,
+ "w": 6,
+ "x": 0,
+ "y": 34
+ },
+ "id": 199,
+ "options": {
+ "legend": {
+ "calcs": [],
+ "displayMode": "list",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "single",
+ "sort": "none"
+ }
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${DS_PROMETHEUS}"
+ },
+ "editorMode": "code",
+ "exemplar": false,
+ "expr": "schema_region{name=\"schema_file_pinned_num\",instance=~\"$instance\"}",
+ "hide": false,
+ "interval": "",
+ "legendFormat": "{{region}}",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "Pinned MNode per SchemaRegion",
+ "type": "timeseries"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${DS_PROMETHEUS}"
+ },
+ "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
+ },
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 1,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "auto",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green"
+ },
+ {
+ "color": "red",
+ "value": 80
+ }
+ ]
+ },
+ "unit": "bytes"
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 7,
+ "w": 6,
+ "x": 6,
+ "y": 34
+ },
+ "id": 203,
+ "options": {
+ "legend": {
+ "calcs": [],
+ "displayMode": "list",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "single",
+ "sort": "none"
+ }
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${DS_PROMETHEUS}"
+ },
+ "editorMode": "code",
+ "expr": "schema_region{name=\"schema_file_pinned_mem\",instance=~\"$instance\"}",
+ "legendFormat": "{{region}}",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "Pinned Memory per SchemaRegion",
+ "type": "timeseries"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${DS_PROMETHEUS}"
+ },
+ "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
+ },
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 1,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "auto",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green"
+ },
+ {
+ "color": "red",
+ "value": 80
+ }
+ ]
+ }
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 7,
+ "w": 6,
+ "x": 12,
+ "y": 34
+ },
+ "id": 209,
+ "options": {
+ "legend": {
+ "calcs": [],
+ "displayMode": "list",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "single",
+ "sort": "none"
+ }
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${DS_PROMETHEUS}"
+ },
+ "editorMode": "code",
+ "expr": "schema_region{name=\"schema_file_cache_node_num\",instance=~\"$instance\"}",
+ "legendFormat": "{{region}}",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "Cache MNode per SchemaRegion",
+ "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
+ },
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 1,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "auto",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green"
+ },
+ {
+ "color": "red",
+ "value": 80
+ }
+ ]
+ }
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 7,
+ "w": 6,
+ "x": 18,
+ "y": 34
+ },
+ "id": 211,
+ "options": {
+ "legend": {
+ "calcs": [],
+ "displayMode": "list",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "single",
+ "sort": "none"
+ }
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${DS_PROMETHEUS}"
+ },
+ "editorMode": "code",
+ "expr": "schema_region{name=~\"schema_file_mlog_.*\",instance=~\"$instance\"}",
+ "legendFormat": "{{name}}_{{region}}",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "MLog Length and Checkpoint",
+ "type": "timeseries"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${DS_PROMETHEUS}"
+ },
+ "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
+ },
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 1,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "auto",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green"
+ },
+ {
+ "color": "red",
+ "value": 80
+ }
+ ]
+ }
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 7,
+ "w": 6,
+ "x": 0,
+ "y": 41
+ },
+ "id": 201,
+ "options": {
+ "legend": {
+ "calcs": [],
+ "displayMode": "list",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "single",
+ "sort": "none"
+ }
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${DS_PROMETHEUS}"
+ },
+ "editorMode": "code",
+ "expr": "schema_region{name=\"schema_file_unpinned_num\",instance=~\"$instance\"}",
+ "interval": "",
+ "legendFormat": "{{region}}",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "Unpinned MNode per SchemaRegion",
+ "type": "timeseries"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${DS_PROMETHEUS}"
+ },
+ "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
+ },
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 1,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "auto",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green"
+ },
+ {
+ "color": "red",
+ "value": 80
+ }
+ ]
+ },
+ "unit": "bytes"
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 7,
+ "w": 6,
+ "x": 6,
+ "y": 41
+ },
+ "id": 205,
+ "options": {
+ "legend": {
+ "calcs": [],
+ "displayMode": "list",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "single",
+ "sort": "none"
+ }
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${DS_PROMETHEUS}"
+ },
+ "editorMode": "code",
+ "expr": "schema_region{name=\"schema_file_unpinned_mem\",instance=~\"$instance\"}",
+ "legendFormat": "{{region}}",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "Unpinned Memory per SchemaRegion",
+ "type": "timeseries"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${DS_PROMETHEUS}"
+ },
+ "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
+ },
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 1,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "auto",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green"
+ },
+ {
+ "color": "red",
+ "value": 80
+ }
+ ]
+ }
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 7,
+ "w": 6,
+ "x": 12,
+ "y": 41
+ },
+ "id": 207,
+ "options": {
+ "legend": {
+ "calcs": [],
+ "displayMode": "list",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "single",
+ "sort": "none"
+ }
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${DS_PROMETHEUS}"
+ },
+ "editorMode": "code",
+ "expr": "schema_region{name=\"schema_file_buffer_node_num\",instance=~\"$instance\"}",
+ "legendFormat": "{{region}}",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "Buffer MNode per SchemaRegion",
+ "type": "timeseries"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${DS_PROMETHEUS}"
+ },
+ "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
+ },
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 1,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "auto",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green"
+ },
+ {
+ "color": "red",
+ "value": 80
+ }
+ ]
+ }
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 7,
+ "w": 6,
+ "x": 18,
+ "y": 41
+ },
+ "id": 220,
+ "options": {
+ "legend": {
+ "calcs": [],
+ "displayMode": "list",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "single",
+ "sort": "none"
+ }
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${DS_PROMETHEUS}"
+ },
+ "editorMode": "code",
+ "expr": "schema_engine{name=~\"schema_file_pinned_num|schema_file_unpinned_num\",instance=~\"$instance\"}",
+ "legendFormat": "{{name}}",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "Schema File Memory MNode Number",
+ "type": "timeseries"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${DS_PROMETHEUS}"
+ },
+ "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
+ },
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 1,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "auto",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green"
+ },
+ {
+ "color": "red",
+ "value": 80
+ }
+ ]
+ }
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 7,
+ "w": 6,
+ "x": 0,
+ "y": 48
+ },
+ "id": 221,
+ "options": {
+ "legend": {
+ "calcs": [],
+ "displayMode": "list",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "single",
+ "sort": "none"
+ }
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${DS_PROMETHEUS}"
+ },
+ "editorMode": "code",
+ "expr": "schema_engine{name=~\"schema_file_flush_thread_num|schema_file_release_thread_num\",instance=~\"$instance\"}",
+ "legendFormat": "{{name}}",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "Release and Flush Thread Number",
+ "type": "timeseries"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${DS_PROMETHEUS}"
+ },
+ "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
+ },
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 1,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "auto",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green"
+ },
+ {
+ "color": "red",
+ "value": 80
+ }
+ ]
+ }
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 7,
+ "w": 6,
+ "x": 6,
+ "y": 48
+ },
+ "id": 223,
+ "options": {
+ "legend": {
+ "calcs": [],
+ "displayMode": "list",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "single",
+ "sort": "none"
+ }
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${DS_PROMETHEUS}"
+ },
+ "editorMode": "code",
+ "expr": "rate(schema_engine_seconds_count{name=~\"schema_file_release|schema_file_flush\",instance=~\"$instance\"}[1m])",
+ "legendFormat": "{{name}}",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "Release and Flush MNode Rate",
+ "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
+ },
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 1,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "auto",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green"
+ },
+ {
+ "color": "red",
+ "value": 80
+ }
+ ]
+ }
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 7,
+ "w": 6,
+ "x": 12,
+ "y": 48
+ },
+ "id": 229,
+ "options": {
+ "legend": {
+ "calcs": [],
+ "displayMode": "list",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "single",
+ "sort": "none"
+ }
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${DS_PROMETHEUS}"
+ },
+ "editorMode": "code",
+ "expr": "schema_engine_seconds{name=~\"schema_file_release|schema_file_flush\",quantile=\"0.5\",instance=~\"$instance\"}",
+ "legendFormat": "{{name}}",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "Time Consumed of Relead and Flush (99%)",
+ "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
+ },
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 1,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "auto",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green"
+ },
+ {
+ "color": "red",
+ "value": 80
+ }
+ ]
+ }
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 7,
+ "w": 6,
+ "x": 18,
+ "y": 48
+ },
+ "id": 228,
+ "options": {
+ "legend": {
+ "calcs": [],
+ "displayMode": "list",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "single",
+ "sort": "none"
+ }
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${DS_PROMETHEUS}"
+ },
+ "editorMode": "code",
+ "expr": "rate(schema_engine_seconds_sum{name=~\"schema_file_release|schema_file_flush\",instance=~\"$instance\"}[1m])/rate(schema_engine_seconds_count{name=~\"schema_file_release|schema_file_flush\",instance=~\"$instance\"}[1m])",
+ "legendFormat": "{{name}}",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "Time Consumed of Relead and Flush (avg)",
+ "type": "timeseries"
+ }
+ ],
+ "title": "Schema Engine",
+ "type": "row"
+ },
+ {
+ "collapsed": false,
+ "gridPos": {
+ "h": 1,
+ "w": 24,
+ "x": 0,
+ "y": 10
+ },
+ "id": 231,
+ "panels": [],
+ "title": "Write Performance",
+ "type": "row"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${DS_PROMETHEUS}"
+ },
+ "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
+ },
+ "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": "bytes"
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 9,
+ "w": 8,
+ "x": 0,
+ "y": 11
+ },
+ "id": 237,
+ "options": {
+ "legend": {
+ "calcs": [],
+ "displayMode": "list",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "single",
+ "sort": "none"
+ }
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${DS_PROMETHEUS}"
+ },
+ "editorMode": "builder",
+ "expr": "file_size{name=\"wal\", instance=\"$instance\"}",
+ "legendFormat": "wal_file_size",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "WAL File Size",
+ "type": "timeseries"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${DS_PROMETHEUS}"
+ },
+ "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
+ },
+ "lineInterpolation": "stepBefore",
+ "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
+ }
+ ]
+ }
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 9,
+ "w": 9,
+ "x": 8,
+ "y": 11
+ },
+ "id": 235,
+ "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": "builder",
+ "exemplar": false,
+ "expr": "file_count{name=\"wal\", instance=\"$instance\"}",
+ "instant": false,
+ "legendFormat": "wal_file_num",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "WAL File Num",
+ "type": "timeseries"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${DS_PROMETHEUS}"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ },
+ {
+ "color": "red",
+ "value": 80
+ }
+ ]
+ },
+ "unit": "short"
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 9,
+ "w": 7,
+ "x": 17,
+ "y": 11
+ },
+ "id": 239,
+ "options": {
+ "colorMode": "value",
+ "graphMode": "area",
+ "justifyMode": "auto",
+ "orientation": "auto",
+ "reduceOptions": {
+ "calcs": [
+ "lastNotNull"
+ ],
+ "fields": "",
+ "values": false
+ },
+ "textMode": "auto"
+ },
+ "pluginVersion": "9.2.0",
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${DS_PROMETHEUS}"
+ },
+ "editorMode": "builder",
+ "expr": "wal_node_num{name=\"wal_nodes_num\", instance=\"$instance\"}",
+ "legendFormat": "{{name}}",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "WAL Nodes Num",
+ "type": "stat"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${DS_PROMETHEUS}"
+ },
+ "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
+ },
+ "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": "bytes"
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 8,
+ "w": 12,
+ "x": 0,
+ "y": 20
+ },
+ "id": 271,
+ "options": {
+ "legend": {
+ "calcs": [],
+ "displayMode": "list",
+ "placement": "right",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "single",
+ "sort": "none"
+ }
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${DS_PROMETHEUS}"
+ },
+ "editorMode": "builder",
+ "expr": "wal_node_info{name=\"oldest_mem_table_ram_when_cause_snapshot\", instance=\"$instance\"}",
+ "legendFormat": "WALNode[{{type}}]-P{{quantile}}",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "Oldest MemTable Ram Cost When Cause Snapshot",
+ "type": "timeseries"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${DS_PROMETHEUS}"
+ },
+ "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
+ },
+ "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": "bytes"
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 8,
+ "w": 12,
+ "x": 12,
+ "y": 20
+ },
+ "id": 272,
+ "options": {
+ "legend": {
+ "calcs": [],
+ "displayMode": "list",
+ "placement": "right",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "single",
+ "sort": "none"
+ }
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${DS_PROMETHEUS}"
+ },
+ "editorMode": "builder",
+ "expr": "wal_node_info{name=\"oldest_mem_table_ram_when_cause_flush\", instance=\"$instance\"}",
+ "legendFormat": "WALNode[{{type}}]-P{{quantile}}",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "Oldest MemTable Ram Cost When Cause Flush",
+ "type": "timeseries"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${DS_PROMETHEUS}"
+ },
+ "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
+ },
+ "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
+ }
+ ]
+ }
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 8,
+ "w": 12,
+ "x": 0,
+ "y": 28
+ },
+ "id": 274,
+ "options": {
+ "legend": {
+ "calcs": [],
+ "displayMode": "list",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "single",
+ "sort": "none"
+ }
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${DS_PROMETHEUS}"
+ },
+ "editorMode": "builder",
+ "expr": "pending_flush_task{type=\"pending_task_num\", instance=\"$instance\"}",
+ "legendFormat": "{{type}}",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "Pending Flush Task Num",
+ "type": "timeseries"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${DS_PROMETHEUS}"
+ },
+ "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
+ },
+ "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
+ }
+ ]
+ }
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 8,
+ "w": 12,
+ "x": 12,
+ "y": 28
+ },
+ "id": 275,
+ "options": {
+ "legend": {
+ "calcs": [],
+ "displayMode": "list",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "single",
+ "sort": "none"
+ }
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${DS_PROMETHEUS}"
+ },
+ "editorMode": "builder",
+ "expr": "pending_flush_task{type=\"pending_sub_task_num\", instance=\"$instance\"}",
+ "legendFormat": "{{type}}",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "Pending Flush Sub Task Num",
+ "type": "timeseries"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${DS_PROMETHEUS}"
+ },
+ "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
+ },
+ "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": "percent"
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 8,
+ "w": 12,
+ "x": 0,
+ "y": 36
+ },
+ "id": 277,
+ "options": {
+ "legend": {
+ "calcs": [],
+ "displayMode": "list",
+ "placement": "right",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "single",
+ "sort": "none"
+ }
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${DS_PROMETHEUS}"
+ },
+ "editorMode": "builder",
+ "expr": "flushing_mem_table_status{name=\"compression_ratio\", instance=\"$instance\"}",
+ "interval": "",
+ "legendFormat": "{{name}}-{{region}}-P{{quantile}}",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "Tsfile Compression Ratio Of Flushing MemTable",
+ "type": "timeseries"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${DS_PROMETHEUS}"
+ },
+ "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,
@@ -15230,7 +17528,7 @@
},
"lineInterpolation": "linear",
"lineWidth": 1,
- "pointSize": 1,
+ "pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
@@ -15251,78 +17549,117 @@
{
"color": "green",
"value": null
+ },
+ {
+ "color": "red",
+ "value": 80
}
]
},
"unit": "bytes"
},
- "overrides": [
- {
- "matcher": {
- "id": "byName",
- "options": "schema_file_flush_threshold"
- },
- "properties": [
- {
- "id": "color",
- "value": {
- "fixedColor": "orange",
- "mode": "fixed"
- }
- },
- {
- "id": "custom.fillOpacity",
- "value": 0
- }
- ]
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 8,
+ "w": 12,
+ "x": 12,
+ "y": 36
+ },
+ "id": 279,
+ "options": {
+ "legend": {
+ "calcs": [],
+ "displayMode": "list",
+ "placement": "right",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "single",
+ "sort": "none"
+ }
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${DS_PROMETHEUS}"
},
- {
- "matcher": {
- "id": "byName",
- "options": "schema_file_release_threshold"
- },
- "properties": [
- {
- "id": "color",
- "value": {
- "fixedColor": "yellow",
- "mode": "fixed"
- }
- },
- {
- "id": "custom.fillOpacity",
- "value": 0
- }
- ]
+ "editorMode": "builder",
+ "expr": "flushing_mem_table_status{name=\"flush_tsfile_size\", instance=\"$instance\"}",
+ "legendFormat": "{{name}}-{{region}}-P{{quantile}}",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "Flush TsFile Size Of DataRegions",
+ "type": "timeseries"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${DS_PROMETHEUS}"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
},
- {
- "matcher": {
- "id": "byName",
- "options": "schema_region_mem_capacity"
+ "custom": {
+ "axisCenteredZero": false,
+ "axisColorMode": "text",
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 0,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
},
- "properties": [
+ "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": [
{
- "id": "color",
- "value": {
- "fixedColor": "red",
- "mode": "fixed"
- }
+ "color": "green",
+ "value": null
},
{
- "id": "custom.fillOpacity",
- "value": 0
+ "color": "red",
+ "value": 80
}
]
- }
- ]
+ },
+ "unit": "percent"
+ },
+ "overrides": []
},
"gridPos": {
"h": 8,
- "w": 16,
- "x": 8,
- "y": 10
+ "w": 12,
+ "x": 0,
+ "y": 44
},
- "id": 217,
+ "id": 265,
"options": {
"legend": {
"calcs": [],
@@ -15341,14 +17678,14 @@
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
- "editorMode": "code",
- "expr": "schema_engine{name=~\"schema_region_total_mem_usage|schema_region_mem_capacity|schema_file_release_threshold|schema_file_flush_threshold|schema_file_pinned_mem|schema_file_unpinned_mem\",instance=~\"$instance\"}",
- "legendFormat": "{{name}}",
+ "editorMode": "builder",
+ "expr": "wal_buffer{name=\"used_ratio\", instance=\"$instance\"}",
+ "legendFormat": "{{name}}-P{{quantile}}",
"range": true,
"refId": "A"
}
],
- "title": "Schema Region Memory Overview",
+ "title": "WAL Buffer Used Ratio",
"type": "timeseries"
},
{
@@ -15359,75 +17696,89 @@
"fieldConfig": {
"defaults": {
"color": {
- "mode": "thresholds"
+ "mode": "palette-classic"
},
- "mappings": [
- {
- "options": {
- "0": {
- "index": 0,
- "text": "RatisConsensus"
- },
- "1": {
- "index": 1,
- "text": "SimpleConsensus"
- }
- },
- "type": "value"
+ "custom": {
+ "axisCenteredZero": false,
+ "axisColorMode": "text",
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 0,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": 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": 4,
- "w": 4,
- "x": 0,
- "y": 14
- },
- "id": 225,
- "options": {
- "colorMode": "value",
- "graphMode": "none",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
+ "h": 8,
+ "w": 12,
+ "x": 12,
+ "y": 44
+ },
+ "id": 267,
+ "options": {
+ "legend": {
+ "calcs": [],
+ "displayMode": "list",
+ "placement": "right",
+ "showLegend": true
},
- "textMode": "value"
+ "tooltip": {
+ "mode": "single",
+ "sort": "none"
+ }
},
- "pluginVersion": "9.3.1",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
- "editorMode": "code",
- "exemplar": false,
- "expr": "schema_engine{name=\"schema_region_consensus\",instance=~\"$instance\"}",
- "instant": false,
- "legendFormat": "{{name}}",
+ "editorMode": "builder",
+ "expr": "wal_buffer{name=\"entries_count\", instance=\"$instance\"}",
+ "legendFormat": "{{name}}-P{{quantile}}",
"range": true,
"refId": "A"
}
],
- "title": "Schema Consensus Protocol",
- "type": "stat"
+ "title": "WAL Buffer Entries Count",
+ "type": "timeseries"
},
{
"datasource": {
@@ -15437,7 +17788,37 @@
"fieldConfig": {
"defaults": {
"color": {
- "mode": "thresholds"
+ "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
+ },
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "auto",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
},
"mappings": [],
"thresholds": {
@@ -15446,52 +17827,52 @@
{
"color": "green",
"value": null
+ },
+ {
+ "color": "red",
+ "value": 80
}
]
},
- "unit": "none"
+ "unit": "percent"
},
"overrides": []
},
"gridPos": {
- "h": 4,
- "w": 4,
- "x": 4,
- "y": 14
+ "h": 8,
+ "w": 12,
+ "x": 0,
+ "y": 52
},
- "id": 222,
+ "id": 269,
"options": {
- "colorMode": "value",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
+ "legend": {
+ "calcs": [],
+ "displayMode": "list",
+ "placement": "right",
+ "showLegend": true
},
- "textMode": "value"
+ "tooltip": {
+ "mode": "single",
+ "sort": "none"
+ }
},
- "pluginVersion": "9.3.1",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
- "editorMode": "code",
- "exemplar": false,
- "expr": "quantity{name=\"timeSeries\",instance=~\"$instance\"}",
- "instant": false,
- "legendFormat": "{{name}}",
+ "editorMode": "builder",
+ "expr": "wal_node_info{name=\"effective_ratio_info\", instance=\"$instance\"}",
+ "interval": "",
+ "legendFormat": "WALNode[{{type}}]-P{{quantile}}",
"range": true,
"refId": "A"
}
],
- "title": "Time Series Number",
- "type": "stat"
+ "title": "Effective Info Ratio Of WALNode",
+ "type": "timeseries"
},
{
"datasource": {
@@ -15520,7 +17901,7 @@
},
"lineInterpolation": "linear",
"lineWidth": 1,
- "pointSize": 1,
+ "pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
@@ -15547,22 +17928,39 @@
"value": 80
}
]
- }
+ },
+ "unit": "s"
},
- "overrides": []
+ "overrides": [
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "FLUSH_MEMORY_TABLE Cost"
+ },
+ "properties": [
+ {
+ "id": "color",
+ "value": {
+ "fixedColor": "#F2495C",
+ "mode": "fixed"
+ }
+ }
+ ]
+ }
+ ]
},
"gridPos": {
- "h": 7,
+ "h": 8,
"w": 12,
- "x": 0,
- "y": 18
+ "x": 12,
+ "y": 52
},
- "id": 215,
+ "id": 253,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
- "placement": "bottom",
+ "placement": "right",
"showLegend": true
},
"tooltip": {
@@ -15576,14 +17974,18 @@
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
- "editorMode": "code",
- "expr": "schema_region{name=\"schema_region_series_cnt\",instance=~\"$instance\"}",
- "legendFormat": "{{region}}",
+ "editorMode": "builder",
+ "exemplar": false,
+ "expr": "wal_cost_seconds{stage=\"make_checkpoint\", instance=\"$instance\"}",
+ "instant": false,
+ "interval": "",
+ "legendFormat": "{{type}}-P{{quantile}}",
"range": true,
"refId": "A"
}
],
- "title": "Timeseries Count per SchemaRegion",
+ "title": "Make Checkpoint Costs ",
+ "transformations": [],
"type": "timeseries"
},
{
@@ -15612,7 +18014,7 @@
},
"lineInterpolation": "linear",
"lineWidth": 1,
- "pointSize": 1,
+ "pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
@@ -15645,17 +18047,17 @@
"overrides": []
},
"gridPos": {
- "h": 7,
+ "h": 8,
"w": 12,
- "x": 12,
- "y": 18
+ "x": 0,
+ "y": 60
},
- "id": 213,
+ "id": 281,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
- "placement": "bottom",
+ "placement": "right",
"showLegend": true
},
"tooltip": {
@@ -15669,14 +18071,26 @@
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
- "editorMode": "code",
- "expr": "schema_region{name=\"schema_region_mem_usage\",instance=~\"$instance\"}",
+ "editorMode": "builder",
+ "expr": "data_region_mem_cost{instance=\"$instance\"}",
"legendFormat": "{{region}}",
"range": true,
"refId": "A"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${DS_PROMETHEUS}"
+ },
+ "editorMode": "code",
+ "expr": "sum(data_region_mem_cost)",
+ "hide": false,
+ "legendFormat": "Total",
+ "range": true,
+ "refId": "B"
}
],
- "title": "Memory Usgae per SchemaRegion",
+ "title": "Data Region Mem Cost",
"type": "timeseries"
},
{
@@ -15705,7 +18119,7 @@
},
"lineInterpolation": "linear",
"lineWidth": 1,
- "pointSize": 1,
+ "pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
@@ -15732,22 +18146,23 @@
"value": 80
}
]
- }
+ },
+ "unit": "s"
},
"overrides": []
},
"gridPos": {
- "h": 7,
- "w": 6,
- "x": 0,
- "y": 25
+ "h": 8,
+ "w": 12,
+ "x": 12,
+ "y": 60
},
- "id": 199,
+ "id": 247,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
- "placement": "bottom",
+ "placement": "right",
"showLegend": true
},
"tooltip": {
@@ -15761,17 +18176,14 @@
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
- "editorMode": "code",
- "exemplar": false,
- "expr": "schema_region{name=\"schema_file_pinned_num\",instance=~\"$instance\"}",
- "hide": false,
- "interval": "",
- "legendFormat": "{{region}}",
+ "editorMode": "builder",
+ "expr": "flush_sub_task_cost_seconds{instance=\"$instance\"}",
+ "legendFormat": "{{type}}-P{{quantile}}",
"range": true,
"refId": "A"
}
],
- "title": "Pinned MNode per SchemaRegion",
+ "title": "Flush Sub Task Cost ",
"type": "timeseries"
},
{
@@ -15800,7 +18212,7 @@
},
"lineInterpolation": "linear",
"lineWidth": 1,
- "pointSize": 1,
+ "pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
@@ -15828,22 +18240,22 @@
}
]
},
- "unit": "bytes"
+ "unit": "s"
},
"overrides": []
},
"gridPos": {
- "h": 7,
- "w": 6,
- "x": 6,
- "y": 25
+ "h": 8,
+ "w": 12,
+ "x": 0,
+ "y": 68
},
- "id": 203,
+ "id": 251,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
- "placement": "bottom",
+ "placement": "right",
"showLegend": true
},
"tooltip": {
@@ -15857,14 +18269,14 @@
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
- "editorMode": "code",
- "expr": "schema_region{name=\"schema_file_pinned_mem\",instance=~\"$instance\"}",
- "legendFormat": "{{region}}",
+ "editorMode": "builder",
+ "expr": "wal_cost_seconds{stage=\"sync_wal_buffer\", instance=\"$instance\"}",
+ "legendFormat": "{{type}}_wal_buffer-P{{quantile}}",
"range": true,
"refId": "A"
}
],
- "title": "Pinned Memory per SchemaRegion",
+ "title": "Sync WAL Buffer Cost ",
"type": "timeseries"
},
{
@@ -15893,7 +18305,7 @@
},
"lineInterpolation": "linear",
"lineWidth": 1,
- "pointSize": 1,
+ "pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
@@ -15920,22 +18332,23 @@
"value": 80
}
]
- }
+ },
+ "unit": "s"
},
"overrides": []
},
"gridPos": {
- "h": 7,
- "w": 6,
+ "h": 8,
+ "w": 12,
"x": 12,
- "y": 25
+ "y": 68
},
- "id": 209,
+ "id": 263,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
- "placement": "bottom",
+ "placement": "right",
"showLegend": true
},
"tooltip": {
@@ -15949,14 +18362,14 @@
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
- "editorMode": "code",
- "expr": "schema_region{name=\"schema_file_cache_node_num\",instance=~\"$instance\"}",
- "legendFormat": "{{region}}",
+ "editorMode": "builder",
+ "expr": "wal_cost_seconds{stage=\"serialize_wal_entry\", type=\"serialize_wal_entry_total\", instance=\"$instance\"}",
+ "legendFormat": "{{type}}-P{{quantile}}",
"range": true,
"refId": "A"
}
],
- "title": "Cache MNode per SchemaRegion",
+ "title": "WAL Serialize Total Cost ",
"type": "timeseries"
},
{
@@ -15964,7 +18377,6 @@
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
- "description": "",
"fieldConfig": {
"defaults": {
"color": {
@@ -15986,7 +18398,7 @@
},
"lineInterpolation": "linear",
"lineWidth": 1,
- "pointSize": 1,
+ "pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
@@ -16013,22 +18425,23 @@
"value": 80
}
]
- }
+ },
+ "unit": "s"
},
"overrides": []
},
"gridPos": {
- "h": 7,
- "w": 6,
- "x": 18,
- "y": 25
+ "h": 8,
+ "w": 12,
+ "x": 0,
+ "y": 76
},
- "id": 211,
+ "id": 245,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
- "placement": "bottom",
+ "placement": "right",
"showLegend": true
},
"tooltip": {
@@ -16042,14 +18455,14 @@
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
- "editorMode": "code",
- "expr": "schema_region{name=~\"schema_file_mlog_.*\",instance=~\"$instance\"}",
- "legendFormat": "{{name}}_{{region}}",
+ "editorMode": "builder",
+ "expr": "cost_task_seconds{name=\"flush\", instance=\"$instance\"}",
+ "legendFormat": "{{name}}-P{{quantile}}",
"range": true,
"refId": "A"
}
],
- "title": "MLog Length and Checkpoint",
+ "title": "Flush MemTable Cost ",
"type": "timeseries"
},
{
@@ -16078,7 +18491,7 @@
},
"lineInterpolation": "linear",
"lineWidth": 1,
- "pointSize": 1,
+ "pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
@@ -16105,22 +18518,23 @@
"value": 80
}
]
- }
+ },
+ "unit": "s"
},
"overrides": []
},
"gridPos": {
- "h": 7,
- "w": 6,
- "x": 0,
- "y": 32
+ "h": 8,
+ "w": 12,
+ "x": 12,
+ "y": 76
},
- "id": 201,
+ "id": 241,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
- "placement": "bottom",
+ "placement": "right",
"showLegend": true
},
"tooltip": {
@@ -16134,15 +18548,14 @@
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
- "editorMode": "code",
- "expr": "schema_region{name=\"schema_file_unpinned_num\",instance=~\"$instance\"}",
- "interval": "",
- "legendFormat": "{{region}}",
+ "editorMode": "builder",
+ "expr": "performance_overview_schedule_detail_seconds{stage=~\"wal\", instance=\"$instance\"}",
+ "legendFormat": "write_to_{{stage}}-P{{quantile}}",
"range": true,
"refId": "A"
}
],
- "title": "Unpinned MNode per SchemaRegion",
+ "title": "Write To WAL Cost ",
"type": "timeseries"
},
{
@@ -16171,7 +18584,7 @@
},
"lineInterpolation": "linear",
"lineWidth": 1,
- "pointSize": 1,
+ "pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
@@ -16199,22 +18612,22 @@
}
]
},
- "unit": "bytes"
+ "unit": "s"
},
"overrides": []
},
"gridPos": {
- "h": 7,
- "w": 6,
- "x": 6,
- "y": 32
+ "h": 8,
+ "w": 12,
+ "x": 0,
+ "y": 84
},
- "id": 205,
+ "id": 249,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
- "placement": "bottom",
+ "placement": "right",
"showLegend": true
},
"tooltip": {
@@ -16228,14 +18641,14 @@
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
- "editorMode": "code",
- "expr": "schema_region{name=\"schema_file_unpinned_mem\",instance=~\"$instance\"}",
- "legendFormat": "{{region}}",
+ "editorMode": "builder",
+ "expr": "wal_cost_seconds{stage=\"serialize_wal_entry\", type=\"serialize_one_wal_info_entry\", instance=\"$instance\"}",
+ "legendFormat": "{{stage}}-P{{quantile}}",
"range": true,
"refId": "A"
}
],
- "title": "Unpinned Memory per SchemaRegion",
+ "title": "Serialize One WAL Info Entry Cost ",
"type": "timeseries"
},
{
@@ -16262,9 +18675,9 @@
"tooltip": false,
"viz": false
},
- "lineInterpolation": "linear",
+ "lineInterpolation": "stepAfter",
"lineWidth": 1,
- "pointSize": 1,
+ "pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
@@ -16291,22 +18704,23 @@
"value": 80
}
]
- }
+ },
+ "unit": "s"
},
"overrides": []
},
"gridPos": {
- "h": 7,
- "w": 6,
+ "h": 8,
+ "w": 12,
"x": 12,
- "y": 32
+ "y": 84
},
- "id": 207,
+ "id": 243,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
- "placement": "bottom",
+ "placement": "right",
"showLegend": true
},
"tooltip": {
@@ -16320,14 +18734,14 @@
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
- "editorMode": "code",
- "expr": "schema_region{name=\"schema_file_buffer_node_num\",instance=~\"$instance\"}",
- "legendFormat": "{{region}}",
+ "editorMode": "builder",
+ "expr": "flush_cost_seconds{instance=\"$instance\"}",
+ "legendFormat": "{{stage}}-P{{quantile}}",
"range": true,
"refId": "A"
}
],
- "title": "Buffer MNode per SchemaRegion",
+ "title": "Stage Cost Of MemTable Flush Task",
"type": "timeseries"
},
{
@@ -16356,7 +18770,7 @@
},
"lineInterpolation": "linear",
"lineWidth": 1,
- "pointSize": 1,
+ "pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
@@ -16383,22 +18797,23 @@
"value": 80
}
]
- }
+ },
+ "unit": "s"
},
"overrides": []
},
"gridPos": {
- "h": 7,
- "w": 6,
- "x": 18,
- "y": 32
+ "h": 8,
+ "w": 12,
+ "x": 0,
+ "y": 92
},
- "id": 220,
+ "id": 262,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
- "placement": "bottom",
+ "placement": "right",
"showLegend": true
},
"tooltip": {
@@ -16412,14 +18827,14 @@
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
- "editorMode": "code",
- "expr": "schema_engine{name=~\"schema_file_pinned_num|schema_file_unpinned_num\",instance=~\"$instance\"}",
- "legendFormat": "{{name}}",
+ "editorMode": "builder",
+ "expr": "performance_overview_schedule_detail_seconds{stage=~\"memtable\", instance=\"$instance\"}",
+ "legendFormat": "write_to_{{stage}}-P{{quantile}}",
"range": true,
"refId": "A"
}
],
- "title": "Schema File Memory MNode Number",
+ "title": "Write To MemTable Cost ",
"type": "timeseries"
},
{
@@ -16448,7 +18863,7 @@
},
"lineInterpolation": "linear",
"lineWidth": 1,
- "pointSize": 1,
+ "pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
@@ -16475,22 +18890,23 @@
"value": 80
}
]
- }
+ },
+ "unit": "bytes"
},
"overrides": []
},
"gridPos": {
- "h": 7,
- "w": 6,
- "x": 0,
- "y": 39
+ "h": 8,
+ "w": 12,
+ "x": 12,
+ "y": 92
},
- "id": 221,
+ "id": 257,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
- "placement": "bottom",
+ "placement": "right",
"showLegend": true
},
"tooltip": {
@@ -16504,14 +18920,14 @@
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
- "editorMode": "code",
- "expr": "schema_engine{name=~\"schema_file_flush_thread_num|schema_file_release_thread_num\",instance=~\"$instance\"}",
- "legendFormat": "{{name}}",
+ "editorMode": "builder",
+ "expr": "flushing_mem_table_status{name=\"mem_table_size\", instance=\"$instance\"}",
+ "legendFormat": "{{region}}-P{{quantile}}",
"range": true,
"refId": "A"
}
],
- "title": "Release and Flush Thread Number",
+ "title": "Size Of Flushing MemTable",
"type": "timeseries"
},
{
@@ -16540,7 +18956,7 @@
},
"lineInterpolation": "linear",
"lineWidth": 1,
- "pointSize": 1,
+ "pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
@@ -16567,22 +18983,48 @@
"value": 80
}
]
- }
+ },
+ "unit": "none"
},
- "overrides": []
+ "overrides": [
+ {
+ "__systemRef": "hideSeriesFrom",
+ "matcher": {
+ "id": "byNames",
+ "options": {
+ "mode": "exclude",
+ "names": [
+ "Value"
+ ],
+ "prefix": "All except:",
+ "readOnly": true
+ }
+ },
+ "properties": [
+ {
+ "id": "custom.hideFrom",
+ "value": {
+ "legend": false,
+ "tooltip": false,
+ "viz": true
+ }
+ }
+ ]
+ }
+ ]
},
"gridPos": {
- "h": 7,
- "w": 6,
- "x": 6,
- "y": 39
+ "h": 8,
+ "w": 12,
+ "x": 0,
+ "y": 100
},
- "id": 223,
+ "id": 261,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
- "placement": "bottom",
+ "placement": "right",
"showLegend": true
},
"tooltip": {
@@ -16596,14 +19038,16 @@
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
- "editorMode": "code",
- "expr": "rate(schema_engine_seconds_count{name=~\"schema_file_release|schema_file_flush\",instance=~\"$instance\"}[1m])",
- "legendFormat": "{{name}}",
+ "editorMode": "builder",
+ "exemplar": false,
+ "expr": "flushing_mem_table_status{name=\"series_num\", instance=\"$instance\"}",
+ "instant": false,
+ "legendFormat": "{{region}}-P{{quantile}}",
"range": true,
"refId": "A"
}
],
- "title": "Release and Flush MNode Rate",
+ "title": "Series Num Of Flushing MemTable",
"type": "timeseries"
},
{
@@ -16611,7 +19055,6 @@
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
- "description": "",
"fieldConfig": {
"defaults": {
"color": {
@@ -16633,7 +19076,7 @@
},
"lineInterpolation": "linear",
"lineWidth": 1,
- "pointSize": 1,
+ "pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
@@ -16665,17 +19108,17 @@
"overrides": []
},
"gridPos": {
- "h": 7,
- "w": 6,
+ "h": 8,
+ "w": 12,
"x": 12,
- "y": 39
+ "y": 100
},
- "id": 229,
+ "id": 255,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
- "placement": "bottom",
+ "placement": "right",
"showLegend": true
},
"tooltip": {
@@ -16683,20 +19126,21 @@
"sort": "none"
}
},
+ "pluginVersion": "9.3.6",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
- "editorMode": "code",
- "expr": "schema_engine_seconds{name=~\"schema_file_release|schema_file_flush\",quantile=\"0.5\",instance=~\"$instance\"}",
- "legendFormat": "{{name}}",
+ "editorMode": "builder",
+ "expr": "flushing_mem_table_status{name=\"avg_series_points_num\", instance=\"$instance\"}",
+ "legendFormat": "{{region}}-P{{quantile}}",
"range": true,
"refId": "A"
}
],
- "title": "Time Consumed of Relead and Flush (99%)",
+ "title": "Average Point Num Of Flushing MemChunk",
"type": "timeseries"
},
{
@@ -16704,7 +19148,6 @@
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
- "description": "",
"fieldConfig": {
"defaults": {
"color": {
@@ -16726,7 +19169,7 @@
},
"lineInterpolation": "linear",
"lineWidth": 1,
- "pointSize": 1,
+ "pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
@@ -16758,17 +19201,17 @@
"overrides": []
},
"gridPos": {
- "h": 7,
- "w": 6,
- "x": 18,
- "y": 39
+ "h": 8,
+ "w": 12,
+ "x": 0,
+ "y": 108
},
- "id": 228,
+ "id": 259,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
- "placement": "bottom",
+ "placement": "right",
"showLegend": true
},
"tooltip": {
@@ -16782,14 +19225,14 @@
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
- "editorMode": "code",
- "expr": "rate(schema_engine_seconds_sum{name=~\"schema_file_release|schema_file_flush\",instance=~\"$instance\"}[1m])/rate(schema_engine_seconds_count{name=~\"schema_file_release|schema_file_flush\",instance=~\"$instance\"}[1m])",
- "legendFormat": "{{name}}",
+ "editorMode": "builder",
+ "expr": "flushing_mem_table_status{name=\"total_points_num\", instance=\"$instance\"}",
+ "legendFormat": "{{region}}-P{{quantile}}",
"range": true,
"refId": "A"
}
],
- "title": "Time Consumed of Relead and Flush (avg)",
+ "title": "Points Num Of Flushing MemTable",
"type": "timeseries"
}
],
@@ -16850,8 +19293,8 @@
]
},
"time": {
- "from": "now-20m",
- "to": "now-10m"
+ "from": "now-30m",
+ "to": "now"
},
"timepicker": {
"refresh_intervals": [
diff --git a/docs/UserGuide/Monitor-Alert/Metric-Tool.md b/docs/UserGuide/Monitor-Alert/Metric-Tool.md
index eb298ed263..76e7f2c8b8 100644
--- a/docs/UserGuide/Monitor-Alert/Metric-Tool.md
+++ b/docs/UserGuide/Monitor-Alert/Metric-Tool.md
@@ -427,6 +427,34 @@ carefully evaluated. The current Core-level metrics are as follows:
| schema_engine | name="schema_region_number" | AutoGauge | Number of SchemaRegion |
| schema_region | name="schema_region_mem_usage", region="SchemaRegion[{regionId}]" | AutoGauge | Memory usgae for each SchemaRegion |
| schema_region | name="schema_region_series_cnt", region="SchemaRegion[{regionId}]" | AutoGauge | Timeseries count for each SchemaRegion |
+#### 4.2.17 Write Performance
+
+| Metric | Tags | Type | Description |
+|---------------------------|:----------------------------------------------------------------------|-----------|--------------------------------------------------------|
+| wal_node_num | name="wal_nodes_num" | AutoGauge | Num of WALNode |
+| wal_cost | stage="make_checkpoint" type="<checkpoint_type>" | Timer | Time cost of make checkpoints for all checkpoint type |
+| wal_cost | type="serialize_one_wal_info_entry" | Timer | Time cost of serialize one WALInfoEntry |
+| wal_cost | stage="sync_wal_buffer" type="<force_flag>" | Timer | Time cost of sync WALBuffer |
+| wal_buffer | name="used_ratio" | Histogram | Used ratio of WALBuffer |
+| wal_cost | stage="serialize_wal_entry" type="serialize_wal_entry_total" | Timer | Time cost of WALBuffer serialize task |
+| wal_node_info | name="effective_info_ratio" type="<wal_node_id>" | Histogram | Effective info ratio of WALNode |
+| wal_node_info | name="oldest_mem_table_ram_when_cause_snapshot" type="<wal_node_id>" | Histogram | Ram of oldest memTable when cause snapshot |
+| wal_node_info | name="oldest_mem_table_ram_when_cause_flush" type="<wal_node_id>" | Histogram | Ram of oldest memTable when cause flush |
+| flush_sub_task_cost | type="sort_task" | Timer | Time cost of sort series in flush sort stage |
+| flush_sub_task_cost | type="encoding_task" | Timer | Time cost of sub encoding task in flush encoding stage |
+| flush_sub_task_cost | type="io_task" | Timer | Time cost of sub io task in flush io stage |
+| flush_cost | stage="write_plan_indices" | Timer | Time cost of write plan indices |
+| flush_cost | stage="sort" | Timer | Time cost of flush sort stage |
+| flush_cost | stage="encoding" | Timer | Time cost of flush encoding stage |
+| flush_cost | stage="io" | Timer | Time cost of flush io stage |
+| pending_flush_task | type="pending_task_num" | AutoGauge | Num of pending flush task num |
+| pending_flush_task | type="pending_sub_task_num" | AutoGauge | Num of pending flush sub task num |
+| flushing_mem_table_status | name="mem_table_size" region="DataRegion[<data_region_id>]" | Histogram | Size of flushing memTable |
+| flushing_mem_table_status | name="total_point_num" region="DataRegion[<data_region_id>]" | Histogram | Point num of flushing memTable |
+| flushing_mem_table_status | name="series_num" region="DataRegion[<data_region_id>]" | Histogram | Series num of flushing memTable |
+| flushing_mem_table_status | name="avg_series_points_num" region="DataRegion[<data_region_id>]" | Histogram | Point num of flushing memChunk |
+| flushing_mem_table_status | name="tsfile_compression_ratio" region="DataRegion[<data_region_id>]" | Histogram | TsFile Compression ratio of flushing memTable |
+| flushing_mem_table_status | name="flush_tsfile_size" region="DataRegion[<data_region_id>]" | Histogram | TsFile size of flushing memTable |
### 4.3. Normal level Metrics
diff --git a/node-commons/src/main/java/org/apache/iotdb/commons/service/metric/enums/Metric.java b/node-commons/src/main/java/org/apache/iotdb/commons/service/metric/enums/Metric.java
index efc66b7ffb..c707e7683b 100644
--- a/node-commons/src/main/java/org/apache/iotdb/commons/service/metric/enums/Metric.java
+++ b/node-commons/src/main/java/org/apache/iotdb/commons/service/metric/enums/Metric.java
@@ -87,6 +87,15 @@ public enum Metric {
PERFORMANCE_OVERVIEW,
PERFORMANCE_OVERVIEW_DETAIL,
PERFORMANCE_OVERVIEW_SCHEDULE_DETAIL,
+ WAL_NODE_NUM,
+ WAL_NODE_INFO,
+ WAL_BUFFER,
+ PENDING_FLUSH_TASK,
+ WAL_COST,
+ FLUSH_COST,
+ FLUSH_SUB_TASK_COST,
+ FLUSHING_MEM_TABLE_STATUS,
+ DATA_REGION_MEM_COST,
SCHEMA_REGION,
SCHEMA_ENGINE,
SESSION_IDLE_TIME;
diff --git a/server/src/main/java/org/apache/iotdb/db/engine/StorageEngine.java b/server/src/main/java/org/apache/iotdb/db/engine/StorageEngine.java
index f32ee20df8..a542d8ac33 100644
--- a/server/src/main/java/org/apache/iotdb/db/engine/StorageEngine.java
+++ b/server/src/main/java/org/apache/iotdb/db/engine/StorageEngine.java
@@ -56,6 +56,7 @@ import org.apache.iotdb.db.mpp.plan.planner.plan.node.PlanNode;
import org.apache.iotdb.db.mpp.plan.planner.plan.node.load.LoadTsFilePieceNode;
import org.apache.iotdb.db.mpp.plan.scheduler.load.LoadTsFileScheduler;
import org.apache.iotdb.db.rescon.SystemInfo;
+import org.apache.iotdb.db.service.metrics.recorder.WritingMetricsManager;
import org.apache.iotdb.db.sync.SyncService;
import org.apache.iotdb.db.utils.ThreadUtils;
import org.apache.iotdb.db.utils.UpgradeUtils;
@@ -101,6 +102,7 @@ public class StorageEngine implements IService {
private static final IoTDBConfig config = IoTDBDescriptor.getInstance().getConfig();
private static final long TTL_CHECK_INTERVAL = 60 * 1000L;
+ private static final WritingMetricsManager WRITING_METRICS = WritingMetricsManager.getInstance();
/** Time range for dividing database, the time unit is the same with IoTDB's TimestampPrecision */
private static long timePartitionInterval = -1;
@@ -459,6 +461,8 @@ public class StorageEngine implements IService {
String.valueOf(dataRegionId.getId()),
fileFlushPolicy,
logicalStorageGroupName);
+ WRITING_METRICS.createFlushingMemTableStatusMetrics(dataRegionId);
+ WRITING_METRICS.createDataRegionMemoryCostMetrics(dataRegion);
dataRegion.setDataTTLWithTimePrecisionCheck(ttl);
dataRegion.setCustomFlushListeners(customFlushListeners);
dataRegion.setCustomCloseFileListeners(customCloseFileListeners);
@@ -654,6 +658,8 @@ public class StorageEngine implements IService {
deletingDataRegionMap.computeIfAbsent(regionId, k -> dataRegionMap.remove(regionId));
if (region != null) {
region.markDeleted();
+ WRITING_METRICS.removeDataRegionMemoryCostMetrics(regionId);
+ WRITING_METRICS.removeFlushingMemTableStatusMetrics(regionId);
try {
region.abortCompaction();
region.syncDeleteDataFiles();
diff --git a/server/src/main/java/org/apache/iotdb/db/engine/flush/MemTableFlushTask.java b/server/src/main/java/org/apache/iotdb/db/engine/flush/MemTableFlushTask.java
index a0400d0b33..bb7b45d993 100644
--- a/server/src/main/java/org/apache/iotdb/db/engine/flush/MemTableFlushTask.java
+++ b/server/src/main/java/org/apache/iotdb/db/engine/flush/MemTableFlushTask.java
@@ -30,6 +30,8 @@ import org.apache.iotdb.db.engine.memtable.IWritableMemChunkGroup;
import org.apache.iotdb.db.exception.runtime.FlushRunTimeException;
import org.apache.iotdb.db.metadata.idtable.entry.IDeviceID;
import org.apache.iotdb.db.rescon.SystemInfo;
+import org.apache.iotdb.db.service.metrics.WritingMetrics;
+import org.apache.iotdb.db.service.metrics.recorder.WritingMetricsManager;
import org.apache.iotdb.metrics.utils.IoTDBMetricsUtils;
import org.apache.iotdb.metrics.utils.MetricLevel;
import org.apache.iotdb.tsfile.write.chunk.IChunkWriter;
@@ -57,6 +59,7 @@ public class MemTableFlushTask {
private static final Logger LOGGER = LoggerFactory.getLogger(MemTableFlushTask.class);
private static final FlushSubTaskPoolManager SUB_TASK_POOL_MANAGER =
FlushSubTaskPoolManager.getInstance();
+ private static final WritingMetricsManager WRITING_METRICS = WritingMetricsManager.getInstance();
private static IoTDBConfig config = IoTDBDescriptor.getInstance().getConfig();
private final Future<?> encodingTaskFuture;
private final Future<?> ioTaskFuture;
@@ -100,14 +103,22 @@ public class MemTableFlushTask {
/** the function for flushing memtable. */
public void syncFlushMemTable() throws ExecutionException, InterruptedException {
+ long avgSeriesPointsNum =
+ memTable.getSeriesNumber() == 0
+ ? 0
+ : memTable.getTotalPointsNum() / memTable.getSeriesNumber();
LOGGER.info(
"The memTable size of SG {} is {}, the avg series points num in chunk is {}, total timeseries number is {}",
storageGroup,
memTable.memSize(),
- memTable.getSeriesNumber() == 0
- ? 0
- : memTable.getTotalPointsNum() / memTable.getSeriesNumber(),
+ avgSeriesPointsNum,
memTable.getSeriesNumber());
+ WRITING_METRICS.recordFlushingMemTableStatus(
+ storageGroup,
+ memTable.memSize(),
+ memTable.getSeriesNumber(),
+ memTable.getTotalPointsNum(),
+ avgSeriesPointsNum);
long estimatedTemporaryMemSize = 0L;
if (config.isEnableMemControl() && SystemInfo.getInstance().isEncodingFasterThanIo()) {
@@ -146,7 +157,9 @@ public class MemTableFlushTask {
* sort task (first task of flush pipeline)
*/
series.sortTvListForFlush();
- sortTime += System.currentTimeMillis() - startTime;
+ long subTaskTime = System.currentTimeMillis() - startTime;
+ sortTime += subTaskTime;
+ WRITING_METRICS.recordFlushSubTaskCost(WritingMetrics.SORT_TASK, subTaskTime);
encodingTaskQueue.put(series);
}
@@ -158,6 +171,7 @@ public class MemTableFlushTask {
storageGroup,
writer.getFile().getName(),
sortTime);
+ WRITING_METRICS.recordFlushCost(WritingMetrics.FLUSH_STAGE_SORT, sortTime);
try {
encodingTaskFuture.get();
@@ -169,7 +183,11 @@ public class MemTableFlushTask {
ioTaskFuture.get();
try {
+ long writePlanIndicesStartTime = System.currentTimeMillis();
writer.writePlanIndices();
+ WRITING_METRICS.recordFlushCost(
+ WritingMetrics.WRITE_PLAN_INDICES,
+ System.currentTimeMillis() - writePlanIndicesStartTime);
} catch (IOException e) {
throw new ExecutionException(e);
}
@@ -247,7 +265,9 @@ public class MemTableFlushTask {
LOGGER.error("Put task into ioTaskQueue Interrupted");
Thread.currentThread().interrupt();
}
- memSerializeTime += System.currentTimeMillis() - starTime;
+ long subTaskTime = System.currentTimeMillis() - starTime;
+ WRITING_METRICS.recordFlushSubTaskCost(WritingMetrics.ENCODING_TASK, subTaskTime);
+ memSerializeTime += subTaskTime;
}
}
try {
@@ -280,6 +300,7 @@ public class MemTableFlushTask {
storageGroup,
writer.getFile().getName(),
memSerializeTime);
+ WRITING_METRICS.recordFlushCost(WritingMetrics.FLUSH_STAGE_ENCODING, memSerializeTime);
}
};
@@ -318,13 +339,17 @@ public class MemTableFlushTask {
"Database {} memtable {}, io task meets error.", storageGroup, memTable, e);
throw new FlushRunTimeException(e);
}
- ioTime += System.currentTimeMillis() - starTime;
+ long subTaskTime = System.currentTimeMillis() - starTime;
+ ioTime += subTaskTime;
+ WRITING_METRICS.recordFlushSubTaskCost(WritingMetrics.IO_TASK, subTaskTime);
}
LOGGER.debug(
"flushing a memtable to file {} in database {}, io cost {}ms",
writer.getFile().getName(),
storageGroup,
ioTime);
+ WRITING_METRICS.recordFlushTsFileSize(storageGroup, writer.getFile().length());
+ WRITING_METRICS.recordFlushCost(WritingMetrics.FLUSH_STAGE_IO, ioTime);
};
static class TaskEnd {
diff --git a/server/src/main/java/org/apache/iotdb/db/engine/storagegroup/TsFileProcessor.java b/server/src/main/java/org/apache/iotdb/db/engine/storagegroup/TsFileProcessor.java
index a7dace8019..af7db6f5f8 100644
--- a/server/src/main/java/org/apache/iotdb/db/engine/storagegroup/TsFileProcessor.java
+++ b/server/src/main/java/org/apache/iotdb/db/engine/storagegroup/TsFileProcessor.java
@@ -56,6 +56,7 @@ import org.apache.iotdb.db.query.context.QueryContext;
import org.apache.iotdb.db.rescon.MemTableManager;
import org.apache.iotdb.db.rescon.PrimitiveArrayManager;
import org.apache.iotdb.db.rescon.SystemInfo;
+import org.apache.iotdb.db.service.metrics.recorder.WritingMetricsManager;
import org.apache.iotdb.db.sync.SyncService;
import org.apache.iotdb.db.sync.sender.manager.ISyncManager;
import org.apache.iotdb.db.utils.MemUtils;
@@ -1258,6 +1259,9 @@ public class TsFileProcessor {
compressionRatio,
totalMemTableSize,
writer.getPos());
+ String dataRegionId = dataRegionInfo.getDataRegion().getDataRegionId();
+ WritingMetricsManager.getInstance()
+ .recordTsFileCompressionRatioOfFlushingMemTable(dataRegionId, compressionRatio);
CompressionRatio.getInstance().updateRatio(compressionRatio);
} catch (IOException e) {
logger.error(
diff --git a/server/src/main/java/org/apache/iotdb/db/service/metrics/DataNodeMetricsHelper.java b/server/src/main/java/org/apache/iotdb/db/service/metrics/DataNodeMetricsHelper.java
index 453f4f9933..b5bbf78136 100644
--- a/server/src/main/java/org/apache/iotdb/db/service/metrics/DataNodeMetricsHelper.java
+++ b/server/src/main/java/org/apache/iotdb/db/service/metrics/DataNodeMetricsHelper.java
@@ -42,6 +42,7 @@ public class DataNodeMetricsHelper {
MetricService.getInstance().addMetricSet(new ProcessMetrics());
MetricService.getInstance().addMetricSet(new SystemMetrics(true));
MetricService.getInstance().addMetricSet(new DiskMetrics(IoTDBConstant.DN_ROLE));
+ MetricService.getInstance().addMetricSet(new WritingMetrics());
// bind query related metrics
MetricService.getInstance().addMetricSet(new QueryPlanCostMetricSet());
diff --git a/server/src/main/java/org/apache/iotdb/db/service/metrics/WritingMetrics.java b/server/src/main/java/org/apache/iotdb/db/service/metrics/WritingMetrics.java
new file mode 100644
index 0000000000..0f55ca70d8
--- /dev/null
+++ b/server/src/main/java/org/apache/iotdb/db/service/metrics/WritingMetrics.java
@@ -0,0 +1,245 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.iotdb.db.service.metrics;
+
+import org.apache.iotdb.commons.service.metric.enums.Metric;
+import org.apache.iotdb.commons.service.metric.enums.Tag;
+import org.apache.iotdb.db.engine.flush.FlushManager;
+import org.apache.iotdb.db.wal.WALManager;
+import org.apache.iotdb.db.wal.checkpoint.CheckpointType;
+import org.apache.iotdb.metrics.AbstractMetricService;
+import org.apache.iotdb.metrics.metricsets.IMetricSet;
+import org.apache.iotdb.metrics.utils.MetricLevel;
+import org.apache.iotdb.metrics.utils.MetricType;
+
+import java.util.Arrays;
+
+public class WritingMetrics implements IMetricSet {
+ private static final WALManager WAL_MANAGER = WALManager.getInstance();
+ public static final String WAL_NODES_NUM = "wal_nodes_num";
+ public static final String MAKE_CHECKPOINT = "make_checkpoint";
+ public static final String SERIALIZE_WAL_ENTRY = "serialize_wal_entry";
+ public static final String SERIALIZE_ONE_WAL_INFO_ENTRY = "serialize_one_wal_info_entry";
+ public static final String SERIALIZE_WAL_ENTRY_TOTAL = "serialize_wal_entry_total";
+ public static final String SYNC = "sync";
+ public static final String FSYNC = "fsync";
+ public static final String SYNC_WAL_BUFFER = "sync_wal_buffer";
+ public static final String FLUSH_STAGE_SORT = "sort";
+ public static final String FLUSH_STAGE_ENCODING = "encoding";
+ public static final String FLUSH_STAGE_IO = "io";
+ public static final String WRITE_PLAN_INDICES = "write_plan_indices";
+ public static final String SORT_TASK = "sort_task";
+ public static final String ENCODING_TASK = "encoding_task";
+ public static final String IO_TASK = "io_task";
+ public static final String MEM_TABLE_SIZE = "mem_table_size";
+ public static final String POINTS_NUM = "total_points_num";
+ public static final String SERIES_NUM = "series_num";
+ public static final String AVG_SERIES_POINT_NUM = "avg_series_points_num";
+ public static final String USED_RATIO = "used_ratio";
+ public static final String ENTRIES_COUNT = "entries_count";
+ public static final String PENDING_TASK_NUM = "pending_task_num";
+ public static final String PENDING_SUB_TASK_NUM = "pending_sub_task_num";
+ public static final String COMPRESSION_RATIO = "compression_ratio";
+ public static final String EFFECTIVE_RATIO_INFO = "effective_ratio_info";
+ public static final String OLDEST_MEM_TABLE_RAM_WHEN_CAUSE_SNAPSHOT =
+ "oldest_mem_table_ram_when_cause_snapshot";
+ public static final String OLDEST_MEM_TABLE_RAM_WHEN_CAUSE_FLUSH =
+ "oldest_mem_table_ram_when_cause_flush";
+ public static final String FLUSH_TSFILE_SIZE = "flush_tsfile_size";
+
+ private void bindFlushMetrics(AbstractMetricService metricService) {
+ Arrays.asList(FLUSH_STAGE_SORT, FLUSH_STAGE_ENCODING, FLUSH_STAGE_IO, WRITE_PLAN_INDICES)
+ .forEach(
+ stage ->
+ metricService.getOrCreateTimer(
+ Metric.FLUSH_COST.toString(),
+ MetricLevel.IMPORTANT,
+ Tag.STAGE.toString(),
+ stage));
+ metricService.createAutoGauge(
+ Metric.PENDING_FLUSH_TASK.toString(),
+ MetricLevel.IMPORTANT,
+ FlushManager.getInstance(),
+ FlushManager::getNumberOfPendingTasks,
+ Tag.TYPE.toString(),
+ PENDING_TASK_NUM);
+ metricService.createAutoGauge(
+ Metric.PENDING_FLUSH_TASK.toString(),
+ MetricLevel.IMPORTANT,
+ FlushManager.getInstance(),
+ FlushManager::getNumberOfPendingSubTasks,
+ Tag.TYPE.toString(),
+ PENDING_SUB_TASK_NUM);
+ }
+
+ private void unbindFlushMetrics(AbstractMetricService metricService) {
+ Arrays.asList(FLUSH_STAGE_SORT, FLUSH_STAGE_ENCODING, FLUSH_STAGE_IO, WRITE_PLAN_INDICES)
+ .forEach(
+ stage ->
+ metricService.remove(
+ MetricType.TIMER, Metric.FLUSH_COST.toString(), Tag.STAGE.toString(), stage));
+ Arrays.asList(PENDING_TASK_NUM, PENDING_SUB_TASK_NUM)
+ .forEach(
+ name ->
+ metricService.remove(
+ MetricType.AUTO_GAUGE,
+ Metric.PENDING_FLUSH_TASK.toString(),
+ Tag.NAME.toString(),
+ name));
+ }
+
+ private void bindFlushSubTaskMetrics(AbstractMetricService metricService) {
+ Arrays.asList(SORT_TASK, ENCODING_TASK, IO_TASK)
+ .forEach(
+ type ->
+ metricService.getOrCreateTimer(
+ Metric.FLUSH_SUB_TASK_COST.toString(),
+ MetricLevel.IMPORTANT,
+ Tag.TYPE.toString(),
+ type));
+ }
+
+ private void unbindFlushSubTaskMetrics(AbstractMetricService metricService) {
+ Arrays.asList(SORT_TASK, ENCODING_TASK, IO_TASK)
+ .forEach(
+ type ->
+ metricService.remove(
+ MetricType.TIMER,
+ Metric.FLUSH_SUB_TASK_COST.toString(),
+ Tag.TYPE.toString(),
+ type));
+ }
+
+ private void bindWALMetrics(AbstractMetricService metricService) {
+ metricService.createAutoGauge(
+ Metric.WAL_NODE_NUM.toString(),
+ MetricLevel.IMPORTANT,
+ WAL_MANAGER,
+ WALManager::getWALNodesNum,
+ Tag.NAME.toString(),
+ WAL_NODES_NUM);
+ Arrays.asList(USED_RATIO, ENTRIES_COUNT)
+ .forEach(
+ name ->
+ metricService.getOrCreateHistogram(
+ Metric.WAL_BUFFER.toString(),
+ MetricLevel.IMPORTANT,
+ Tag.NAME.toString(),
+ name));
+ }
+
+ private void unbindWALMetrics(AbstractMetricService metricService) {
+ metricService.remove(
+ MetricType.AUTO_GAUGE, Metric.WAL_NODE_NUM.toString(), Tag.NAME.toString(), WAL_NODES_NUM);
+ Arrays.asList(USED_RATIO, ENTRIES_COUNT)
+ .forEach(
+ name ->
+ metricService.remove(
+ MetricType.HISTOGRAM, Metric.WAL_BUFFER.toString(), Tag.NAME.toString(), name));
+ }
+
+ private void bindWALCostMetrics(AbstractMetricService metricService) {
+ Arrays.asList(
+ CheckpointType.GLOBAL_MEMORY_TABLE_INFO.toString(),
+ CheckpointType.CREATE_MEMORY_TABLE.toString(),
+ CheckpointType.FLUSH_MEMORY_TABLE.toString())
+ .forEach(
+ type ->
+ metricService.getOrCreateTimer(
+ Metric.WAL_COST.toString(),
+ MetricLevel.IMPORTANT,
+ Tag.STAGE.toString(),
+ MAKE_CHECKPOINT,
+ Tag.TYPE.toString(),
+ type));
+ Arrays.asList(SERIALIZE_ONE_WAL_INFO_ENTRY, SERIALIZE_WAL_ENTRY_TOTAL)
+ .forEach(
+ type ->
+ metricService.getOrCreateTimer(
+ Metric.WAL_COST.toString(),
+ MetricLevel.IMPORTANT,
+ Tag.STAGE.toString(),
+ SERIALIZE_WAL_ENTRY,
+ Tag.TYPE.toString(),
+ type));
+ Arrays.asList(SYNC, FSYNC)
+ .forEach(
+ type ->
+ metricService.getOrCreateTimer(
+ Metric.WAL_COST.toString(),
+ MetricLevel.IMPORTANT,
+ Tag.STAGE.toString(),
+ SYNC_WAL_BUFFER,
+ Tag.TYPE.toString(),
+ type));
+ }
+
+ private void unbindWALCostMetrics(AbstractMetricService metricService) {
+ Arrays.asList(
+ CheckpointType.GLOBAL_MEMORY_TABLE_INFO.toString(),
+ CheckpointType.CREATE_MEMORY_TABLE.toString(),
+ CheckpointType.FLUSH_MEMORY_TABLE.toString())
+ .forEach(
+ type ->
+ metricService.remove(
+ MetricType.TIMER,
+ Metric.WAL_COST.toString(),
+ Tag.STAGE.toString(),
+ MAKE_CHECKPOINT,
+ Tag.TYPE.toString(),
+ type));
+ Arrays.asList(SERIALIZE_ONE_WAL_INFO_ENTRY, SERIALIZE_WAL_ENTRY_TOTAL)
+ .forEach(
+ type ->
+ metricService.remove(
+ MetricType.TIMER,
+ Metric.WAL_COST.toString(),
+ Tag.STAGE.toString(),
+ SERIALIZE_WAL_ENTRY,
+ Tag.TYPE.toString(),
+ type));
+ Arrays.asList(SYNC, FSYNC)
+ .forEach(
+ type ->
+ metricService.remove(
+ MetricType.TIMER,
+ Metric.WAL_COST.toString(),
+ Tag.STAGE.toString(),
+ SYNC_WAL_BUFFER,
+ Tag.TYPE.toString(),
+ type));
+ }
+
+ @Override
+ public void bindTo(AbstractMetricService metricService) {
+ bindFlushMetrics(metricService);
+ bindFlushSubTaskMetrics(metricService);
+ bindWALMetrics(metricService);
+ bindWALCostMetrics(metricService);
+ }
+
+ @Override
+ public void unbindFrom(AbstractMetricService metricService) {
+ unbindFlushMetrics(metricService);
+ unbindFlushSubTaskMetrics(metricService);
+ unbindWALMetrics(metricService);
+ unbindWALCostMetrics(metricService);
+ }
+}
diff --git a/server/src/main/java/org/apache/iotdb/db/service/metrics/recorder/WritingMetricsManager.java b/server/src/main/java/org/apache/iotdb/db/service/metrics/recorder/WritingMetricsManager.java
new file mode 100644
index 0000000000..5decb9b3a4
--- /dev/null
+++ b/server/src/main/java/org/apache/iotdb/db/service/metrics/recorder/WritingMetricsManager.java
@@ -0,0 +1,351 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.iotdb.db.service.metrics.recorder;
+
+import org.apache.iotdb.commons.consensus.DataRegionId;
+import org.apache.iotdb.commons.service.metric.MetricService;
+import org.apache.iotdb.commons.service.metric.enums.Metric;
+import org.apache.iotdb.commons.service.metric.enums.Tag;
+import org.apache.iotdb.db.engine.storagegroup.DataRegion;
+import org.apache.iotdb.db.service.metrics.WritingMetrics;
+import org.apache.iotdb.db.wal.checkpoint.CheckpointType;
+import org.apache.iotdb.metrics.utils.MetricLevel;
+import org.apache.iotdb.metrics.utils.MetricType;
+
+import java.util.Arrays;
+import java.util.concurrent.TimeUnit;
+
+public class WritingMetricsManager {
+ public static final WritingMetricsManager INSTANCE = new WritingMetricsManager();
+
+ private WritingMetricsManager() {}
+
+ public void createDataRegionMemoryCostMetrics(DataRegion dataRegion) {
+ DataRegionId dataRegionId = new DataRegionId(Integer.parseInt(dataRegion.getDataRegionId()));
+ MetricService.getInstance()
+ .createAutoGauge(
+ Metric.DATA_REGION_MEM_COST.toString(),
+ MetricLevel.IMPORTANT,
+ dataRegion,
+ DataRegion::getMemCost,
+ Tag.REGION.toString(),
+ dataRegionId.toString());
+ }
+
+ public void removeDataRegionMemoryCostMetrics(DataRegionId dataRegionId) {
+ MetricService.getInstance()
+ .remove(
+ MetricType.AUTO_GAUGE,
+ Metric.DATA_REGION_MEM_COST.toString(),
+ Tag.REGION.toString(),
+ dataRegionId.toString());
+ }
+
+ public void createWALNodeInfoMetrics(String walNodeId) {
+ Arrays.asList(
+ WritingMetrics.EFFECTIVE_RATIO_INFO,
+ WritingMetrics.OLDEST_MEM_TABLE_RAM_WHEN_CAUSE_SNAPSHOT,
+ WritingMetrics.OLDEST_MEM_TABLE_RAM_WHEN_CAUSE_FLUSH)
+ .forEach(
+ name ->
+ MetricService.getInstance()
+ .getOrCreateHistogram(
+ Metric.WAL_NODE_INFO.toString(),
+ MetricLevel.IMPORTANT,
+ Tag.NAME.toString(),
+ name,
+ Tag.TYPE.toString(),
+ walNodeId));
+ }
+
+ public void removeWALNodeInfoMetrics(String walNodeId) {
+ Arrays.asList(
+ WritingMetrics.EFFECTIVE_RATIO_INFO,
+ WritingMetrics.OLDEST_MEM_TABLE_RAM_WHEN_CAUSE_SNAPSHOT,
+ WritingMetrics.OLDEST_MEM_TABLE_RAM_WHEN_CAUSE_FLUSH)
+ .forEach(
+ name ->
+ MetricService.getInstance()
+ .remove(
+ MetricType.HISTOGRAM,
+ Tag.NAME.toString(),
+ name,
+ Tag.TYPE.toString(),
+ walNodeId));
+ }
+
+ public void createFlushingMemTableStatusMetrics(DataRegionId dataRegionId) {
+ Arrays.asList(
+ WritingMetrics.MEM_TABLE_SIZE,
+ WritingMetrics.SERIES_NUM,
+ WritingMetrics.POINTS_NUM,
+ WritingMetrics.AVG_SERIES_POINT_NUM,
+ WritingMetrics.COMPRESSION_RATIO,
+ WritingMetrics.FLUSH_TSFILE_SIZE)
+ .forEach(
+ name ->
+ MetricService.getInstance()
+ .getOrCreateHistogram(
+ Metric.FLUSHING_MEM_TABLE_STATUS.toString(),
+ MetricLevel.IMPORTANT,
+ Tag.NAME.toString(),
+ name,
+ Tag.REGION.toString(),
+ dataRegionId.toString()));
+ }
+
+ public void removeFlushingMemTableStatusMetrics(DataRegionId dataRegionId) {
+ Arrays.asList(
+ WritingMetrics.MEM_TABLE_SIZE,
+ WritingMetrics.SERIES_NUM,
+ WritingMetrics.POINTS_NUM,
+ WritingMetrics.AVG_SERIES_POINT_NUM,
+ WritingMetrics.COMPRESSION_RATIO,
+ WritingMetrics.FLUSH_TSFILE_SIZE)
+ .forEach(
+ name ->
+ MetricService.getInstance()
+ .remove(
+ MetricType.HISTOGRAM,
+ Metric.FLUSHING_MEM_TABLE_STATUS.toString(),
+ Tag.NAME.toString(),
+ name,
+ Tag.REGION.toString(),
+ dataRegionId.toString()));
+ }
+
+ public void recordWALNodeEffectiveInfoRatio(String walNodeId, double ratio) {
+ MetricService.getInstance()
+ .histogram(
+ (long) (ratio * 100),
+ Metric.WAL_NODE_INFO.toString(),
+ MetricLevel.IMPORTANT,
+ Tag.NAME.toString(),
+ WritingMetrics.EFFECTIVE_RATIO_INFO,
+ Tag.TYPE.toString(),
+ walNodeId);
+ }
+
+ public void recordMemTableRamWhenCauseSnapshot(String walNodeId, long ram) {
+ MetricService.getInstance()
+ .histogram(
+ ram,
+ Metric.WAL_NODE_INFO.toString(),
+ MetricLevel.IMPORTANT,
+ Tag.NAME.toString(),
+ WritingMetrics.OLDEST_MEM_TABLE_RAM_WHEN_CAUSE_SNAPSHOT,
+ Tag.TYPE.toString(),
+ walNodeId);
+ }
+
+ public void recordMemTableRamWhenCauseFlush(String walNodeId, long ram) {
+ MetricService.getInstance()
+ .histogram(
+ ram,
+ Metric.WAL_NODE_INFO.toString(),
+ MetricLevel.IMPORTANT,
+ Tag.NAME.toString(),
+ WritingMetrics.OLDEST_MEM_TABLE_RAM_WHEN_CAUSE_FLUSH,
+ Tag.TYPE.toString(),
+ walNodeId);
+ }
+
+ public void recordTsFileCompressionRatioOfFlushingMemTable(
+ String dataRegionId, double compressionRatio) {
+ MetricService.getInstance()
+ .histogram(
+ (long) (compressionRatio * 100),
+ Metric.FLUSHING_MEM_TABLE_STATUS.toString(),
+ MetricLevel.IMPORTANT,
+ Tag.NAME.toString(),
+ WritingMetrics.COMPRESSION_RATIO,
+ Tag.REGION.toString(),
+ new DataRegionId(Integer.parseInt(dataRegionId)).toString());
+ }
+
+ public void recordFlushingMemTableStatus(
+ String storageGroup, long memSize, long seriesNum, long totalPointsNum, long avgSeriesNum) {
+ DataRegionId dataRegionId = getDataRegionIdFromStorageGroupStr(storageGroup);
+ if (dataRegionId == null) {
+ return;
+ }
+
+ MetricService.getInstance()
+ .histogram(
+ memSize,
+ Metric.FLUSHING_MEM_TABLE_STATUS.toString(),
+ MetricLevel.IMPORTANT,
+ Tag.NAME.toString(),
+ WritingMetrics.MEM_TABLE_SIZE,
+ Tag.REGION.toString(),
+ dataRegionId.toString());
+ MetricService.getInstance()
+ .histogram(
+ seriesNum,
+ Metric.FLUSHING_MEM_TABLE_STATUS.toString(),
+ MetricLevel.IMPORTANT,
+ Tag.NAME.toString(),
+ WritingMetrics.SERIES_NUM,
+ Tag.REGION.toString(),
+ dataRegionId.toString());
+ MetricService.getInstance()
+ .histogram(
+ totalPointsNum,
+ Metric.FLUSHING_MEM_TABLE_STATUS.toString(),
+ MetricLevel.IMPORTANT,
+ Tag.NAME.toString(),
+ WritingMetrics.POINTS_NUM,
+ Tag.REGION.toString(),
+ dataRegionId.toString());
+ MetricService.getInstance()
+ .histogram(
+ avgSeriesNum,
+ Metric.FLUSHING_MEM_TABLE_STATUS.toString(),
+ MetricLevel.IMPORTANT,
+ Tag.NAME.toString(),
+ WritingMetrics.AVG_SERIES_POINT_NUM,
+ Tag.REGION.toString(),
+ dataRegionId.toString());
+ }
+
+ public void recordFlushTsFileSize(String storageGroup, long size) {
+ DataRegionId dataRegionId = getDataRegionIdFromStorageGroupStr(storageGroup);
+ if (dataRegionId == null) {
+ return;
+ }
+ MetricService.getInstance()
+ .histogram(
+ size,
+ Metric.FLUSHING_MEM_TABLE_STATUS.toString(),
+ MetricLevel.IMPORTANT,
+ Tag.NAME.toString(),
+ WritingMetrics.FLUSH_TSFILE_SIZE,
+ Tag.REGION.toString(),
+ dataRegionId.toString());
+ }
+
+ private DataRegionId getDataRegionIdFromStorageGroupStr(String storageGroup) {
+ int idx = storageGroup.lastIndexOf('-');
+ if (idx == -1) {
+ return null;
+ }
+ String dataRegionIdStr = storageGroup.substring(idx + 1);
+ return new DataRegionId(Integer.parseInt(dataRegionIdStr));
+ }
+
+ public void recordFlushCost(String stage, long costTimeInMillis) {
+ MetricService.getInstance()
+ .timer(
+ costTimeInMillis,
+ TimeUnit.MILLISECONDS,
+ Metric.FLUSH_COST.toString(),
+ MetricLevel.IMPORTANT,
+ Tag.STAGE.toString(),
+ stage);
+ }
+
+ public void recordFlushSubTaskCost(String subTaskType, long costTimeInMillis) {
+ MetricService.getInstance()
+ .timer(
+ costTimeInMillis,
+ TimeUnit.MILLISECONDS,
+ Metric.FLUSH_SUB_TASK_COST.toString(),
+ MetricLevel.IMPORTANT,
+ Tag.TYPE.toString(),
+ subTaskType);
+ }
+
+ public void recordMakeCheckpointCost(CheckpointType type, long costTimeInNanos) {
+ MetricService.getInstance()
+ .timer(
+ costTimeInNanos,
+ TimeUnit.NANOSECONDS,
+ Metric.WAL_COST.toString(),
+ MetricLevel.IMPORTANT,
+ Tag.STAGE.toString(),
+ WritingMetrics.MAKE_CHECKPOINT,
+ Tag.TYPE.toString(),
+ type.toString());
+ }
+
+ public void recordSerializeOneWALInfoEntryCost(long costTimeInNanos) {
+ MetricService.getInstance()
+ .timer(
+ costTimeInNanos,
+ TimeUnit.NANOSECONDS,
+ Metric.WAL_COST.toString(),
+ MetricLevel.IMPORTANT,
+ Tag.STAGE.toString(),
+ WritingMetrics.SERIALIZE_WAL_ENTRY,
+ Tag.TYPE.toString(),
+ WritingMetrics.SERIALIZE_ONE_WAL_INFO_ENTRY);
+ }
+
+ public void recordSerializeWALEntryTotalCost(long costTimeInNanos) {
+ MetricService.getInstance()
+ .timer(
+ costTimeInNanos,
+ TimeUnit.NANOSECONDS,
+ Metric.WAL_COST.toString(),
+ MetricLevel.IMPORTANT,
+ Tag.STAGE.toString(),
+ WritingMetrics.SERIALIZE_WAL_ENTRY,
+ Tag.TYPE.toString(),
+ WritingMetrics.SERIALIZE_WAL_ENTRY_TOTAL);
+ }
+
+ public void recordSyncWALBufferCost(long costTimeInNanos, boolean forceFlag) {
+ String syncType = forceFlag ? WritingMetrics.FSYNC : WritingMetrics.SYNC;
+ MetricService.getInstance()
+ .timer(
+ costTimeInNanos,
+ TimeUnit.NANOSECONDS,
+ Metric.WAL_COST.toString(),
+ MetricLevel.IMPORTANT,
+ Tag.STAGE.toString(),
+ WritingMetrics.SYNC_WAL_BUFFER,
+ Tag.TYPE.toString(),
+ syncType);
+ }
+
+ public void recordWALBufferUsedRatio(double usedRatio) {
+ MetricService.getInstance()
+ .histogram(
+ (long) (usedRatio * 100),
+ Metric.WAL_BUFFER.toString(),
+ MetricLevel.IMPORTANT,
+ Tag.NAME.toString(),
+ WritingMetrics.USED_RATIO);
+ }
+
+ public void recordWALBufferEntriesCount(long count) {
+ MetricService.getInstance()
+ .histogram(
+ count,
+ Metric.WAL_BUFFER.toString(),
+ MetricLevel.IMPORTANT,
+ Tag.NAME.toString(),
+ WritingMetrics.ENTRIES_COUNT);
+ }
+
+ public static WritingMetricsManager getInstance() {
+ return INSTANCE;
+ }
+}
diff --git a/server/src/main/java/org/apache/iotdb/db/wal/WALManager.java b/server/src/main/java/org/apache/iotdb/db/wal/WALManager.java
index 8343f14021..684cf6fd9a 100644
--- a/server/src/main/java/org/apache/iotdb/db/wal/WALManager.java
+++ b/server/src/main/java/org/apache/iotdb/db/wal/WALManager.java
@@ -29,6 +29,7 @@ import org.apache.iotdb.commons.utils.TestOnly;
import org.apache.iotdb.consensus.ConsensusFactory;
import org.apache.iotdb.db.conf.IoTDBConfig;
import org.apache.iotdb.db.conf.IoTDBDescriptor;
+import org.apache.iotdb.db.service.metrics.recorder.WritingMetricsManager;
import org.apache.iotdb.db.wal.allocation.ElasticStrategy;
import org.apache.iotdb.db.wal.allocation.FirstCreateStrategy;
import org.apache.iotdb.db.wal.allocation.NodeAllocationStrategy;
@@ -101,6 +102,7 @@ public class WALManager implements IService {
((FirstCreateStrategy) walNodesManager)
.registerWALNode(applicantUniqueId, logDirectory, startFileVersion, startSearchIndex);
+ WritingMetricsManager.getInstance().createWALNodeInfoMetrics(applicantUniqueId);
}
/** WAL node will be deleted only when using iot consensus protocol */
@@ -112,6 +114,7 @@ public class WALManager implements IService {
}
((FirstCreateStrategy) walNodesManager).deleteWALNode(applicantUniqueId);
+ WritingMetricsManager.getInstance().removeWALNodeInfoMetrics(applicantUniqueId);
}
@Override
@@ -193,6 +196,10 @@ public class WALManager implements IService {
return totalDiskUsage.get();
}
+ public long getWALNodesNum() {
+ return walNodesManager.getNodesNum();
+ }
+
public void addTotalDiskUsage(long size) {
totalDiskUsage.accumulateAndGet(size, Long::sum);
}
diff --git a/server/src/main/java/org/apache/iotdb/db/wal/allocation/ElasticStrategy.java b/server/src/main/java/org/apache/iotdb/db/wal/allocation/ElasticStrategy.java
index 7649c2dbe0..ab7b18bdab 100644
--- a/server/src/main/java/org/apache/iotdb/db/wal/allocation/ElasticStrategy.java
+++ b/server/src/main/java/org/apache/iotdb/db/wal/allocation/ElasticStrategy.java
@@ -86,6 +86,12 @@ public class ElasticStrategy extends AbstractNodeAllocationStrategy {
return snapshot;
}
+ /** non-thread-safe, used for metrics only */
+ @Override
+ public int getNodesNum() {
+ return walNodes.size();
+ }
+
@Override
public void clear() {
nodesLock.lock();
diff --git a/server/src/main/java/org/apache/iotdb/db/wal/allocation/FirstCreateStrategy.java b/server/src/main/java/org/apache/iotdb/db/wal/allocation/FirstCreateStrategy.java
index e3476b4e8e..6e47fbed35 100644
--- a/server/src/main/java/org/apache/iotdb/db/wal/allocation/FirstCreateStrategy.java
+++ b/server/src/main/java/org/apache/iotdb/db/wal/allocation/FirstCreateStrategy.java
@@ -109,6 +109,12 @@ public class FirstCreateStrategy extends AbstractNodeAllocationStrategy {
return snapshot;
}
+ /** non-thread-safe, used for metrics only */
+ @Override
+ public int getNodesNum() {
+ return identifier2Nodes.size();
+ }
+
@Override
public void clear() {
nodesLock.lock();
diff --git a/server/src/main/java/org/apache/iotdb/db/wal/allocation/NodeAllocationStrategy.java b/server/src/main/java/org/apache/iotdb/db/wal/allocation/NodeAllocationStrategy.java
index 5ce3ca3ead..9e7f93d3c4 100644
--- a/server/src/main/java/org/apache/iotdb/db/wal/allocation/NodeAllocationStrategy.java
+++ b/server/src/main/java/org/apache/iotdb/db/wal/allocation/NodeAllocationStrategy.java
@@ -31,6 +31,9 @@ public interface NodeAllocationStrategy {
/** Get all wal nodes */
List<WALNode> getNodesSnapshot();
+ /** Get all wal nodes num */
+ int getNodesNum();
+
@TestOnly
void clear();
}
diff --git a/server/src/main/java/org/apache/iotdb/db/wal/allocation/RoundRobinStrategy.java b/server/src/main/java/org/apache/iotdb/db/wal/allocation/RoundRobinStrategy.java
index 1d715d0d4a..ffe91e2dd9 100644
--- a/server/src/main/java/org/apache/iotdb/db/wal/allocation/RoundRobinStrategy.java
+++ b/server/src/main/java/org/apache/iotdb/db/wal/allocation/RoundRobinStrategy.java
@@ -89,6 +89,12 @@ public class RoundRobinStrategy extends AbstractNodeAllocationStrategy {
return snapshot;
}
+ /** non-thread-safe, used for metrics only */
+ @Override
+ public int getNodesNum() {
+ return walNodes.size();
+ }
+
@Override
public void clear() {
nodesLock.lock();
diff --git a/server/src/main/java/org/apache/iotdb/db/wal/buffer/WALBuffer.java b/server/src/main/java/org/apache/iotdb/db/wal/buffer/WALBuffer.java
index db2d627ef5..41314d0dfe 100644
--- a/server/src/main/java/org/apache/iotdb/db/wal/buffer/WALBuffer.java
+++ b/server/src/main/java/org/apache/iotdb/db/wal/buffer/WALBuffer.java
@@ -25,6 +25,7 @@ import org.apache.iotdb.db.conf.IoTDBConfig;
import org.apache.iotdb.db.conf.IoTDBDescriptor;
import org.apache.iotdb.db.mpp.plan.planner.plan.node.write.DeleteDataNode;
import org.apache.iotdb.db.mpp.plan.planner.plan.node.write.InsertNode;
+import org.apache.iotdb.db.service.metrics.recorder.WritingMetricsManager;
import org.apache.iotdb.db.utils.MmapUtil;
import org.apache.iotdb.db.wal.exception.WALNodeClosedException;
import org.apache.iotdb.db.wal.io.WALMetaData;
@@ -60,6 +61,7 @@ public class WALBuffer extends AbstractWALBuffer {
private static final int HALF_WAL_BUFFER_SIZE = config.getWalBufferSize() / 2;
private static final double FSYNC_BUFFER_RATIO = 0.95;
private static final int QUEUE_CAPACITY = config.getWalBufferQueueCapacity();
+ private static final WritingMetricsManager WRITING_METRICS = WritingMetricsManager.getInstance();
/** whether close method is called */
private volatile boolean isClosed = false;
@@ -161,10 +163,12 @@ public class WALBuffer extends AbstractWALBuffer {
/** In order to control memory usage of blocking queue, get 1 and then serialize 1 */
private void serialize() {
// try to get first WALEntry with blocking interface
+ long start = System.nanoTime();
try {
WALEntry firstWALEntry = walEntries.take();
boolean returnFlag = handleWALEntry(firstWALEntry);
if (returnFlag) {
+ WRITING_METRICS.recordSerializeWALEntryTotalCost(System.nanoTime() - start);
return;
}
} catch (InterruptedException e) {
@@ -190,9 +194,11 @@ public class WALBuffer extends AbstractWALBuffer {
}
boolean returnFlag = handleWALEntry(walEntry);
if (returnFlag) {
+ WRITING_METRICS.recordSerializeWALEntryTotalCost(System.nanoTime() - start);
return;
}
}
+ WRITING_METRICS.recordSerializeWALEntryTotalCost(System.nanoTime() - start);
// call fsync at last and set fsyncListeners
if (totalSize > 0) {
@@ -224,7 +230,9 @@ public class WALBuffer extends AbstractWALBuffer {
private boolean handleInfoEntry(WALEntry walEntry) {
int size = byteBufferView.position();
try {
+ long start = System.nanoTime();
walEntry.serialize(byteBufferView);
+ WRITING_METRICS.recordSerializeOneWALInfoEntryCost(System.nanoTime() - start);
size = byteBufferView.position() - size;
} catch (Exception e) {
logger.error(
@@ -423,14 +431,14 @@ public class WALBuffer extends AbstractWALBuffer {
@Override
public void run() {
+ long start = System.nanoTime();
currentWALFileWriter.updateFileStatus(fileStatus);
- if (logger.isDebugEnabled()) {
- double usedRatio = (double) syncingBuffer.position() / syncingBuffer.capacity();
- logger.debug(
- "Sync wal buffer, forceFlag: {}, buffer used: {} / {} = {}%",
- forceFlag, syncingBuffer.position(), syncingBuffer.capacity(), usedRatio * 100);
- }
+ double usedRatio = (double) syncingBuffer.position() / syncingBuffer.capacity();
+ WRITING_METRICS.recordWALBufferUsedRatio(usedRatio);
+ logger.debug(
+ "Sync wal buffer, forceFlag: {}, buffer used: {} / {} = {}%",
+ forceFlag, syncingBuffer.position(), syncingBuffer.capacity(), usedRatio * 100);
// flush buffer to os
try {
@@ -484,6 +492,8 @@ public class WALBuffer extends AbstractWALBuffer {
fsyncListener.succeed();
}
}
+ WRITING_METRICS.recordWALBufferEntriesCount(info.fsyncListeners.size());
+ WRITING_METRICS.recordSyncWALBufferCost(System.nanoTime() - start, forceFlag);
}
}
diff --git a/server/src/main/java/org/apache/iotdb/db/wal/checkpoint/CheckpointManager.java b/server/src/main/java/org/apache/iotdb/db/wal/checkpoint/CheckpointManager.java
index 020576f9c4..e9bcbf81df 100644
--- a/server/src/main/java/org/apache/iotdb/db/wal/checkpoint/CheckpointManager.java
+++ b/server/src/main/java/org/apache/iotdb/db/wal/checkpoint/CheckpointManager.java
@@ -22,6 +22,7 @@ import org.apache.iotdb.commons.conf.CommonDescriptor;
import org.apache.iotdb.commons.file.SystemFileFactory;
import org.apache.iotdb.db.conf.IoTDBConfig;
import org.apache.iotdb.db.conf.IoTDBDescriptor;
+import org.apache.iotdb.db.service.metrics.recorder.WritingMetricsManager;
import org.apache.iotdb.db.wal.io.CheckpointWriter;
import org.apache.iotdb.db.wal.io.ILogWriter;
import org.apache.iotdb.db.wal.utils.CheckpointFileUtils;
@@ -45,6 +46,7 @@ import java.util.concurrent.locks.ReentrantLock;
public class CheckpointManager implements AutoCloseable {
private static final Logger logger = LoggerFactory.getLogger(CheckpointManager.class);
private static final IoTDBConfig config = IoTDBDescriptor.getInstance().getConfig();
+ private static final WritingMetricsManager WRITING_METRICS = WritingMetricsManager.getInstance();
/** WALNode identifier of this checkpoint manager */
protected final String identifier;
@@ -105,15 +107,18 @@ public class CheckpointManager implements AutoCloseable {
* each checkpoint file
*/
private void makeGlobalInfoCP() {
+ long start = System.nanoTime();
Checkpoint checkpoint =
new Checkpoint(
CheckpointType.GLOBAL_MEMORY_TABLE_INFO, new ArrayList<>(memTableId2Info.values()));
logByCachedByteBuffer(checkpoint);
+ WRITING_METRICS.recordMakeCheckpointCost(checkpoint.getType(), System.nanoTime() - start);
}
/** make checkpoint for create memTable info */
public void makeCreateMemTableCP(MemTableInfo memTableInfo) {
infoLock.lock();
+ long start = System.nanoTime();
try {
maxMemTableId = Math.max(maxMemTableId, memTableInfo.getMemTableId());
memTableId2Info.put(memTableInfo.getMemTableId(), memTableInfo);
@@ -122,6 +127,8 @@ public class CheckpointManager implements AutoCloseable {
CheckpointType.CREATE_MEMORY_TABLE, Collections.singletonList(memTableInfo));
logByCachedByteBuffer(checkpoint);
} finally {
+ WRITING_METRICS.recordMakeCheckpointCost(
+ CheckpointType.CREATE_MEMORY_TABLE, System.nanoTime() - start);
infoLock.unlock();
}
}
@@ -129,6 +136,7 @@ public class CheckpointManager implements AutoCloseable {
/** make checkpoint for flush memTable info */
public void makeFlushMemTableCP(long memTableId) {
infoLock.lock();
+ long start = System.nanoTime();
try {
MemTableInfo memTableInfo = memTableId2Info.remove(memTableId);
if (memTableInfo == null) {
@@ -139,6 +147,8 @@ public class CheckpointManager implements AutoCloseable {
CheckpointType.FLUSH_MEMORY_TABLE, Collections.singletonList(memTableInfo));
logByCachedByteBuffer(checkpoint);
} finally {
+ WRITING_METRICS.recordMakeCheckpointCost(
+ CheckpointType.FLUSH_MEMORY_TABLE, System.nanoTime() - start);
infoLock.unlock();
}
}
diff --git a/server/src/main/java/org/apache/iotdb/db/wal/node/WALNode.java b/server/src/main/java/org/apache/iotdb/db/wal/node/WALNode.java
index 283eb56bf7..8484189bfe 100644
--- a/server/src/main/java/org/apache/iotdb/db/wal/node/WALNode.java
+++ b/server/src/main/java/org/apache/iotdb/db/wal/node/WALNode.java
@@ -35,6 +35,7 @@ import org.apache.iotdb.db.mpp.plan.planner.plan.node.PlanNodeType;
import org.apache.iotdb.db.mpp.plan.planner.plan.node.write.DeleteDataNode;
import org.apache.iotdb.db.mpp.plan.planner.plan.node.write.InsertRowNode;
import org.apache.iotdb.db.mpp.plan.planner.plan.node.write.InsertTabletNode;
+import org.apache.iotdb.db.service.metrics.recorder.WritingMetricsManager;
import org.apache.iotdb.db.wal.WALManager;
import org.apache.iotdb.db.wal.buffer.IWALBuffer;
import org.apache.iotdb.db.wal.buffer.WALBuffer;
@@ -85,6 +86,8 @@ public class WALNode implements IWALNode {
/** timeout threshold when waiting for next wal entry */
private static final long WAIT_FOR_NEXT_WAL_ENTRY_TIMEOUT_IN_SEC = 30;
+ private static final WritingMetricsManager WRITING_METRICS = WritingMetricsManager.getInstance();
+
/** unique identifier of this WALNode */
private final String identifier;
/** directory to store this node's files */
@@ -230,6 +233,7 @@ public class WALNode implements IWALNode {
return;
}
double effectiveInfoRatio = (double) costOfActiveMemTables / totalCost;
+ WRITING_METRICS.recordWALNodeEffectiveInfoRatio(identifier, effectiveInfoRatio);
logger.debug(
"Effective information ratio is {}, active memTables cost is {}, flushed memTables cost is {}",
effectiveInfoRatio,
@@ -350,13 +354,17 @@ public class WALNode implements IWALNode {
// snapshot or flush memTable, flush memTable when it belongs to an old time partition, or
// it's snapshot count or size reach threshold.
int snapshotCount = memTableSnapshotCount.getOrDefault(oldestMemTable.getMemTableId(), 0);
+ long oldestMemTableTVListsRamCost = oldestMemTable.getTVListsRamCost();
if (TsFileUtils.getTimePartition(new File(oldestMemTableInfo.getTsFilePath()))
< dataRegion.getLatestTimePartition()
|| snapshotCount >= config.getMaxWalMemTableSnapshotNum()
- || oldestMemTable.getTVListsRamCost() > config.getWalMemTableSnapshotThreshold()) {
+ || oldestMemTableTVListsRamCost > config.getWalMemTableSnapshotThreshold()) {
flushMemTable(dataRegion, oldestTsFile, oldestMemTable);
+ WRITING_METRICS.recordMemTableRamWhenCauseFlush(identifier, oldestMemTableTVListsRamCost);
} else {
snapshotMemTable(dataRegion, oldestTsFile, oldestMemTableInfo);
+ WRITING_METRICS.recordMemTableRamWhenCauseSnapshot(
+ identifier, oldestMemTableTVListsRamCost);
}
return true;
}