Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

br: add metrics description for snapshot restore and PITR #18516

Merged
merged 6 commits into from
Aug 20, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions grafana-tikv-dashboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,45 @@ This section provides a detailed description of these key metrics on the **TiKV-
- Initial Scanning Trigger Reason: The reason for triggering incremental scanning
- Region Checkpoint Key Putting: The number of checkpoint operations logged to the PD

### Snapshot restore
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

most are for import, why call it Snapshot restore

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The purpose of this PR is to add metrics description for restore, as a new member in the team I find it myself confused when looking at sst importer where it's actually used by restore. I feel like customer might have the same doubt when looking the metrics, so changing the name to be snapshot restore.

I have brought up to the team that we probably should have an abstraction of the restore on the TiKV path, where internally it still calls sst importer. It can be more explicit and meaningful to users this way, and inside of it we can rename or create new metrics to be decoupled with sst importer.

let me know if that makes sense!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

D3Hunter marked this conversation as resolved.
Show resolved Hide resolved

- Import CPU Utilization: CPU utilization aggregated by sst importer.
- Import Thread Count: number of threads used by sst importer.
- Import Errors: error counts during sst import.
- Import RPC Duration: time spent for various RPC calls in sst importer.
- Import RPC Ops: number of total RPC calls in sst importer.
- Import RPC Count: number of inflight RPC calls in sst importer.
- Import Write/Download RPC Duration: RPC time for write/download in sst importer.
- Import Wait Duration: time spent on downloading task waiting in queue for execution.
- Import Read SST Duration: time spent on reading from external storage of a file and download it to TiKV.
- Import Rewrite SST Duration: time spent on rewriting SST based on rewrite rules.
- Import Ingest RPC Duration: time spent on handling ingest RPC request on TiKV.
- Import Ingest SST Duration: time spent on ingesting SST into RocksDB.
- Import Ingest SST Bytes: number of bytes ingested.
- Import Download SST Throughput: SST download throughput in bytes per second.
- TTL Expired: number of expired items after TTL in backup files.
Copy link
Contributor

@BornChanger BornChanger Aug 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can also skip this item since it's raw_kv related, and it also needs to be filtered out from snapshot restore panel.

- cloud request: number of request to cloud providers.

### Point-in-Time Restore
Oreoxmt marked this conversation as resolved.
Show resolved Hide resolved

- CPU Usage: CPU utilization by PITR.
- P99 RPC Duration: 99 percentile of the RPC requests time.
- Import RPC Ops: number of total RPC calls in sst importer.
- Import RPC Count: number of inflight RPC calls in sst importer.
D3Hunter marked this conversation as resolved.
Show resolved Hide resolved
- Cache Events: number of events on file cache during sst import.
- Overall RPC Duration: time spent on RPC calls.
- Read File into Memory Duration: time spent on downloading files from external storage and loaded in to memory.
- Queuing Time: time spent on waiting to get scheduled on a thread.
- Apply Request Throughput: Apply request rate in bytes.
- Downloaded File Size: downloaded file size in bytes.
- Apply Batch Size: number of bytes for applying to Raft store in one batch.
- Blocked by Concurrency Time: time spent on waiting to get executed due to concurrency constraint.
- Apply Request Speed: speed of applying request to Raft store.
- Cached File in Memory: files cached by the applying requests of importer.
- Engine Requests Unfinished: number of pending requests to Raft store.
- Apply Time: time spent on writing data to the Raft store.
- Raft Store Memory Usage: memory usage for Raft store.
Oreoxmt marked this conversation as resolved.
Show resolved Hide resolved

> **Note:**
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Tristan1900 @BornChanger Could you please help confirm whether the following metrics belong to Point-in-Time Restore or Log Backup?

> **Note:**
>
> The following monitoring metrics all use TiDB nodes as their data source, but they have some impact on the log backup process. Therefore, they are placed in the **TiKV Details** dashboard for ease of reference. TiKV actively pushes progress most of the time, but it is normal for some of the following monitoring metrics to occasionally not have sampled data.
- Request Checkpoint Batch Size: The request batch size when the log backup coordinator requests checkpoint information for each TiKV
- Tick Duration \[P99|P90\]: The time taken by the tick inside the coordinator
- Region Checkpoint Failure Reason: The reason why a Region checkpoint cannot advance within the coordinator
- Request Result: The record of the coordinator's success or failure in advancing the Region checkpoint
- Get Region Operation Count: The number of times the coordinator requests Region information from the PD
- Try Advance Trigger Time: The time taken for the coordinator to attempt to advance the checkpoint

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah good catch, it should be log backup, I thought it was a note for the entire dashboard.

>
> The following monitoring metrics all use TiDB nodes as their data source, but they have some impact on the log backup process. Therefore, they are placed in the **TiKV Details** dashboard for ease of reference. TiKV actively pushes progress most of the time, but it is normal for some of the following monitoring metrics to occasionally not have sampled data.
Expand Down
Loading