@@ -23767,37 +23767,36 @@
2376723767 {
2376823768 "aliasColors": {},
2376923769 "bars": false,
23770- "cacheTimeout": null,
23771- "datasource": "tidb-cluster",
23772- "description": "The duration of check and compact operations",
23770+ "dashLength": 10,
23771+ "dashes": false,
23772+ "datasource": {
23773+ "type": "prometheus",
23774+ "uid": "PB0C37C6A9EC17FDC"
23775+ },
23776+ "description": "Time spent on auto compaction operations by type",
2377323777 "editable": true,
2377423778 "error": false,
2377523779 "fieldConfig": {
2377623780 "defaults": {
23777- "thresholds": {
23778- "mode": "absolute",
23779- "steps": []
23780- }
23781- }
23781+ "links": []
23782+ },
23783+ "overrides": []
2378223784 },
2378323785 "fill": 1,
2378423786 "fillGradient": 1,
2378523787 "grid": {
23786- "threshold1": null,
2378723788 "threshold1Color": "rgba(216, 200, 27, 0.27)",
23788- "threshold2": null,
2378923789 "threshold2Color": "rgba(234, 112, 112, 0.22)"
2379023790 },
2379123791 "gridPos": {
2379223792 "h": 7,
2379323793 "w": 12,
2379423794 "x": 0,
23795- "y": 49
23795+ "y": 168
2379623796 },
23797- "height ": null ,
23797+ "hiddenSeries ": false ,
2379823798 "hideTimeOverride": false,
23799- "id": 416,
23800- "interval": null,
23799+ "id": 24763573287,
2380123800 "isNew": true,
2380223801 "legend": {
2380323802 "alignAsTable": true,
2380923808 "min": false,
2381023809 "rightSide": true,
2381123810 "show": true,
23812- "sideWidth": null,
2381323811 "sort": "max",
2381423812 "sortDesc": true,
2381523813 "total": false,
@@ -23818,77 +23816,275 @@
2381823816 "lines": true,
2381923817 "linewidth": 1,
2382023818 "links": [],
23821- "maxDataPoints": null,
23822- "maxPerRow": null,
23823- "minSpan": null,
2382423819 "nullPointMode": "null as zero",
2382523820 "options": {
23826- "alertThreshold": true,
23827- "dataLinks": []
23821+ "alertThreshold": true
2382823822 },
2382923823 "percentage": false,
23824+ "pluginVersion": "8.5.27",
2383023825 "pointradius": 5,
2383123826 "points": false,
2383223827 "renderer": "flot",
23833- "repeat": null,
23834- "repeatDirection": null,
23835- "seriesOverrides": [],
23836- "span": null,
23828+ "seriesOverrides": [
23829+ {
23830+ "alias": "/^count/",
23831+ "bars": false,
23832+ "dashLength": 1,
23833+ "dashes": true,
23834+ "fill": 2,
23835+ "lines": true,
23836+ "spaceLength": 1,
23837+ "transform": "negative-Y",
23838+ "yaxis": 2,
23839+ "zindex": -3
23840+ },
23841+ {
23842+ "alias": "/^avg/",
23843+ "bars": false,
23844+ "fill": 7,
23845+ "lines": true,
23846+ "yaxis": 1,
23847+ "zindex": 0
23848+ }
23849+ ],
23850+ "spaceLength": 10,
2383723851 "stack": false,
2383823852 "steppedLine": false,
2383923853 "targets": [
2384023854 {
23841- "datasource": "tidb-cluster",
23842- "expr": "histogram_quantile($optional_quantile,(\n sum(rate(\n tikv_storage_check_then_compact_duration_seconds_bucket\n {k8s_cluster=\"$k8s_cluster\",tidb_cluster=\"$tidb_cluster\",instance=~\"$instance\"}\n [$__rate_interval]\n)) by (instance, type, le) \n \n \n)) ",
23855+ "datasource": {
23856+ "type": "prometheus",
23857+ "uid": "PB0C37C6A9EC17FDC"
23858+ },
23859+ "expr": "histogram_quantile(0.9999,(\n sum(rate(\n tikv_auto_compaction_duration_seconds_bucket\n {k8s_cluster=\"$k8s_cluster\",tidb_cluster=\"$tidb_cluster\",instance=~\"$instance\"} [1m]\n)) by (le,type)))",
2384323860 "format": "time_series",
2384423861 "hide": false,
2384523862 "instant": false,
2384623863 "interval": "",
2384723864 "intervalFactor": 1,
23848- "legendFormat": "{{instance}} -{{type}}-duration $optional_quantile ",
23865+ "legendFormat": "99.99% -{{type}} {{$additional_groupby}} ",
2384923866 "metric": "",
23850- "query": "histogram_quantile($optional_quantile,(\n sum(rate(\n tikv_storage_check_then_compact_duration_seconds_bucket\n {k8s_cluster=\"$k8s_cluster\",tidb_cluster=\"$tidb_cluster\",instance=~\"$instance\"}\n [$__rate_interval]\n)) by (instance, type, le) \n \n \n)) ",
23851- "refId": "",
23867+ "query": "histogram_quantile(0.9999,(\n sum(rate(\n tikv_auto_compaction_duration_seconds_bucket\n {k8s_cluster=\"$k8s_cluster\",tidb_cluster=\"$tidb_cluster\",instance=~\"$instance\"}\n [$__rate_interval]\n)) by (type, le, $additional_groupby) \n \n \n)) ",
23868+ "refId": "A",
23869+ "step": 10,
23870+ "target": ""
23871+ },
23872+ {
23873+ "datasource": {
23874+ "type": "prometheus",
23875+ "uid": "PB0C37C6A9EC17FDC"
23876+ },
23877+ "expr": "histogram_quantile(0.99,(\n sum(rate(\n tikv_auto_compaction_duration_seconds_bucket\n {k8s_cluster=\"$k8s_cluster\",tidb_cluster=\"$tidb_cluster\",instance=~\"$instance\"}\n [1m]\n)) by (le, type))) ",
23878+ "format": "time_series",
23879+ "hide": false,
23880+ "instant": false,
23881+ "interval": "",
23882+ "intervalFactor": 1,
23883+ "legendFormat": "99%-{{type}} {{$additional_groupby}}",
23884+ "metric": "",
23885+ "query": "histogram_quantile(0.99,(\n sum(rate(\n tikv_auto_compaction_duration_seconds_bucket\n {k8s_cluster=\"$k8s_cluster\",tidb_cluster=\"$tidb_cluster\",instance=~\"$instance\"}\n [$__rate_interval]\n)) by (type, le, $additional_groupby) \n \n \n)) ",
23886+ "refId": "B",
23887+ "step": 10,
23888+ "target": ""
23889+ },
23890+ {
23891+ "datasource": {
23892+ "type": "prometheus",
23893+ "uid": "PB0C37C6A9EC17FDC"
23894+ },
23895+ "expr": "(sum(rate(\n tikv_auto_compaction_duration_seconds_sum\n {k8s_cluster=\"$k8s_cluster\",tidb_cluster=\"$tidb_cluster\",instance=~\"$instance\"}\n [1m]\n)) by (type) / sum(rate(\n tikv_auto_compaction_duration_seconds_count\n {k8s_cluster=\"$k8s_cluster\",tidb_cluster=\"$tidb_cluster\",instance=~\"$instance\"}\n [1m]\n)) by (type))",
23896+ "format": "time_series",
23897+ "hide": false,
23898+ "instant": false,
23899+ "interval": "",
23900+ "intervalFactor": 1,
23901+ "legendFormat": "avg-{{type}} {{$additional_groupby}}",
23902+ "metric": "",
23903+ "query": "(sum(rate(\n tikv_auto_compaction_duration_seconds_sum\n {k8s_cluster=\"$k8s_cluster\",tidb_cluster=\"$tidb_cluster\",instance=~\"$instance\"}\n [$__rate_interval]\n)) by (type, $additional_groupby) / sum(rate(\n tikv_auto_compaction_duration_seconds_count\n {k8s_cluster=\"$k8s_cluster\",tidb_cluster=\"$tidb_cluster\",instance=~\"$instance\"}\n [$__rate_interval]\n)) by (type, $additional_groupby) )",
23904+ "refId": "C",
23905+ "step": 10,
23906+ "target": ""
23907+ },
23908+ {
23909+ "datasource": {
23910+ "type": "prometheus",
23911+ "uid": "PB0C37C6A9EC17FDC"
23912+ },
23913+ "expr": "sum(rate(\n tikv_auto_compaction_duration_seconds_count\n {k8s_cluster=\"$k8s_cluster\",tidb_cluster=\"$tidb_cluster\",instance=~\"$instance\"}\n [1m]\n)) by (type)",
23914+ "format": "time_series",
23915+ "hide": true,
23916+ "instant": false,
23917+ "interval": "",
23918+ "intervalFactor": 1,
23919+ "legendFormat": "count-{{type}} {{$additional_groupby}}",
23920+ "metric": "",
23921+ "query": "sum(rate(\n tikv_auto_compaction_duration_seconds_count\n {k8s_cluster=\"$k8s_cluster\",tidb_cluster=\"$tidb_cluster\",instance=~\"$instance\"}\n [$__rate_interval]\n)) by (type, $additional_groupby) ",
23922+ "refId": "D",
2385223923 "step": 10,
2385323924 "target": ""
2385423925 }
2385523926 ],
2385623927 "thresholds": [],
23857- "timeFrom": null,
23858- "timeShift": null,
23859- "title": "Check and Compact duration $optional_quantile",
23928+ "timeRegions": [],
23929+ "title": "Auto Compaction Duration",
2386023930 "tooltip": {
2386123931 "msResolution": true,
2386223932 "shared": true,
2386323933 "sort": 0,
2386423934 "value_type": "individual"
2386523935 },
2386623936 "transformations": [],
23867- "transparent": false,
2386823937 "type": "graph",
2386923938 "xaxis": {
2387023939 "mode": "time",
23871- "name": null,
2387223940 "show": true,
2387323941 "values": []
2387423942 },
2387523943 "yaxes": [
2387623944 {
23877- "decimals": null,
2387823945 "format": "s",
23879- "label": null,
2388023946 "logBase": 1,
23881- "max": null,
23882- "min": null,
2388323947 "show": true
2388423948 },
2388523949 {
23886- "decimals": null,
2388723950 "format": "short",
23888- "label": null,
2388923951 "logBase": 1,
23890- "max": null,
23891- "min": null,
23952+ "show": true
23953+ }
23954+ ],
23955+ "yaxis": {
23956+ "align": false,
23957+ "alignLevel": 0
23958+ }
23959+ },
23960+ {
23961+ "aliasColors": {},
23962+ "bars": false,
23963+ "dashLength": 10,
23964+ "dashes": false,
23965+ "datasource": {
23966+ "type": "prometheus",
23967+ "uid": "PB0C37C6A9EC17FDC"
23968+ },
23969+ "description": "Number of regions meeting compaction threshold and pending candidates",
23970+ "editable": true,
23971+ "error": false,
23972+ "fieldConfig": {
23973+ "defaults": {
23974+ "links": []
23975+ },
23976+ "overrides": []
23977+ },
23978+ "fill": 1,
23979+ "fillGradient": 1,
23980+ "grid": {
23981+ "threshold1Color": "rgba(216, 200, 27, 0.27)",
23982+ "threshold2Color": "rgba(234, 112, 112, 0.22)"
23983+ },
23984+ "gridPos": {
23985+ "h": 7,
23986+ "w": 12,
23987+ "x": 12,
23988+ "y": 168
23989+ },
23990+ "hiddenSeries": false,
23991+ "hideTimeOverride": false,
23992+ "id": 24763573288,
23993+ "isNew": true,
23994+ "legend": {
23995+ "alignAsTable": true,
23996+ "avg": false,
23997+ "current": true,
23998+ "hideEmpty": true,
23999+ "hideZero": true,
24000+ "max": true,
24001+ "min": false,
24002+ "rightSide": true,
24003+ "show": true,
24004+ "sort": "max",
24005+ "sortDesc": true,
24006+ "total": false,
24007+ "values": true
24008+ },
24009+ "lines": true,
24010+ "linewidth": 1,
24011+ "links": [],
24012+ "nullPointMode": "null as zero",
24013+ "options": {
24014+ "alertThreshold": true
24015+ },
24016+ "percentage": false,
24017+ "pluginVersion": "8.5.27",
24018+ "pointradius": 5,
24019+ "points": false,
24020+ "renderer": "flot",
24021+ "seriesOverrides": [],
24022+ "spaceLength": 10,
24023+ "stack": false,
24024+ "steppedLine": false,
24025+ "targets": [
24026+ {
24027+ "datasource": {
24028+ "type": "prometheus",
24029+ "uid": "PB0C37C6A9EC17FDC"
24030+ },
24031+ "expr": "sum((\n tikv_auto_compaction_regions_meet_threshold\n {k8s_cluster=\"$k8s_cluster\",tidb_cluster=\"$tidb_cluster\",instance=~\"$instance\"}\n \n)) by (instance) ",
24032+ "format": "time_series",
24033+ "hide": false,
24034+ "instant": false,
24035+ "interval": "",
24036+ "intervalFactor": 1,
24037+ "legendFormat": "regions meet threshold",
24038+ "metric": "",
24039+ "query": "sum((\n tikv_auto_compaction_regions_meet_threshold\n {k8s_cluster=\"$k8s_cluster\",tidb_cluster=\"$tidb_cluster\",instance=~\"$instance\"}\n \n)) by (instance) ",
24040+ "refId": "A",
24041+ "step": 10,
24042+ "target": ""
24043+ },
24044+ {
24045+ "datasource": {
24046+ "type": "prometheus",
24047+ "uid": "PB0C37C6A9EC17FDC"
24048+ },
24049+ "expr": "sum((\n tikv_auto_compaction_pending_candidates\n {k8s_cluster=\"$k8s_cluster\",tidb_cluster=\"$tidb_cluster\",instance=~\"$instance\"}\n \n)) by (instance) ",
24050+ "format": "time_series",
24051+ "hide": false,
24052+ "instant": false,
24053+ "interval": "",
24054+ "intervalFactor": 1,
24055+ "legendFormat": "pending candidates",
24056+ "metric": "",
24057+ "query": "sum((\n tikv_auto_compaction_pending_candidates\n {k8s_cluster=\"$k8s_cluster\",tidb_cluster=\"$tidb_cluster\",instance=~\"$instance\"}\n \n)) by (instance) ",
24058+ "refId": "B",
24059+ "step": 10,
24060+ "target": ""
24061+ }
24062+ ],
24063+ "thresholds": [],
24064+ "timeRegions": [],
24065+ "title": "Auto Compaction Regions Status",
24066+ "tooltip": {
24067+ "msResolution": true,
24068+ "shared": true,
24069+ "sort": 0,
24070+ "value_type": "individual"
24071+ },
24072+ "transformations": [],
24073+ "type": "graph",
24074+ "xaxis": {
24075+ "mode": "time",
24076+ "show": true,
24077+ "values": []
24078+ },
24079+ "yaxes": [
24080+ {
24081+ "format": "short",
24082+ "logBase": 1,
24083+ "show": true
24084+ },
24085+ {
24086+ "format": "short",
24087+ "logBase": 1,
2389224088 "show": true
2389324089 }
2389424090 ],
0 commit comments