diff --git a/grafana-tikv-dashboard.md b/grafana-tikv-dashboard.md index 8743f91ff666..6c0a76564242 100644 --- a/grafana-tikv-dashboard.md +++ b/grafana-tikv-dashboard.md @@ -1,4 +1,4 @@ ---- +--- title: TiKV 监控指标详解 aliases: ['/docs-cn/dev/grafana-tikv-dashboard/','/docs-cn/dev/reference/key-monitoring-metrics/tikv-dashboard/'] summary: TiKV 监控指标详解:TiUP 部署 TiDB 集群时,一键部署监控系统 (Prometheus & Grafana),监控架构详见 TiDB 监控框架概述。Grafana Dashboard 分为 PD、TiDB、TiKV、Node_exporter、Overview、Performance_overview 等。对于日常运维,通过观察 TiKV-Details 面板上的指标,可以了解 TiKV 当前的状态。根据性能地图,可以检查集群的状态是否符合预期。TiKV-Details 默认的监控信息包括 Cluster、Errors、Server、gRPC、Thread CPU、PD、Raft IO、Raft process、Raft message、Raft propose、Raft admin、Local reader、Unified Read Pool、Storage、Flow Control、Scheduler 等。 @@ -100,6 +100,13 @@ summary: TiKV 监控指标详解:TiUP 部署 TiDB 集群时,一键部署监 - PD heartbeats:发送给 PD 的心跳的速度 - PD validate peers:TiKV 发送给 PD 用于验证 TiKV 的 peer 有效的消息的速度 +### Raft Log + +- Raft log fetch:Raft log 拉取相关指标。 +- Raft log GC seek operations:Raft log GC seek 操作次数。 +- Raft log fetch :Raft log 拉取相关指标(面板名称含尾随空格)。 +- Raft log GC seek operations :Raft log GC seek 操作次数(面板名称含尾随空格)。 + ### Raft IO - Apply log duration:Raft apply 日志所花费的时间 @@ -556,6 +563,432 @@ summary: TiKV 监控指标详解:TiUP 部署 TiDB 集群时,一键部署监 - raw_batch_delete:删除一批 key/value 对 - raw_delete_range:删除连续的一段区间 +## 其他面板补充 + +### Duration + +- Write Pipeline Duration:Write Pipeline Duration 相关指标。 +- Cop Read Duration:Cop Read Duration 相关指标。 + +### Errors + +- Damaged files:Damaged files 相关指标。 + +### Server + +- Region written bytes:Region written bytes 相关指标。 +- Region written keys:Region written keys 相关指标。 +- Clear overlap region duration:Clear overlap region duration 相关指标。 +- Written key size:Written key size 相关指标。 +- Written value size for every put of apply worker:Written value size for every put of apply worker 相关指标。 +- Hibernate Peers:Hibernate Peers 相关指标。 +- Memory trace:Memory trace 相关指标。 +- Raft Entry Cache Evicts:Raft Entry Cache Evicts 相关指标。 +- Resolve address duration:Resolve address duration 相关指标。 +- Thread Pool Schedule Wait Duration$optional_quantile:Thread Pool Schedule Wait Duration$optional_quantile 相关指标。 +- Average Thread Pool Schedule Wait Duration:Average Thread Pool Schedule Wait Duration 相关指标。 +- Disk IO time per second:Disk IO time per second 相关指标。 +- Disk IO bytes per second:Disk IO bytes per second 相关指标。 + +### gRPC + +- gRPC message duration$optional_quantile:gRPC message duration$optional_quantile 相关指标。 +- gRPC batch commands wait duration:gRPC batch commands wait duration 相关指标。 + +### Storage + +- Storage async snapshot duration (pure local read):Storage async snapshot duration (pure local read) 相关指标。 +- Storage async snapshot duration (pure local read):Storage async snapshot duration (pure local read) 相关指标。 +- Read index propose wait duration:Read index propose wait duration 相关指标。 +- Read index propose wait duration:Read index propose wait duration 相关指标。 +- Read index confirm duration:Read index confirm duration 相关指标。 +- Read index confirm duration:Read index confirm duration 相关指标。 +- Process Stat Cpu Usage:Process Stat Cpu Usage 相关指标。 +- Full compaction duration seconds:Full compaction duration seconds 相关指标。 +- Full compaction pause duration:Full compaction pause duration 相关指标。 +- Full compaction per-increment duration:Full compaction per-increment duration 相关指标。 +- Concurrency manager max-ts:Concurrency manager max-ts 相关指标。 + +### Local Reader + +- Local reader reject requests:Local reader reject requests 相关指标。 +- Local reader read requests:Local reader read requests 相关指标。 + +### Thread CPU + +- Region worker CPU:Region worker CPU 相关指标。 +- Snap generator CPU:Snap generator CPU 相关指标。 +- Storage read pool CPU:Storage read pool CPU 相关指标。 +- Coprocessor read pool CPU:Coprocessor read pool CPU 相关指标。 +- IME CPU:IME CPU 相关指标。 +- Busy Threads (>80%):Busy Threads (>80%) 相关指标。 + +### IO Breakdown + +- Write IO bytes:Write IO bytes 相关指标。 +- Read IO bytes:Read IO bytes 相关指标。 +- IO threshold:IO threshold 相关指标。 +- Rate Limiter Request Wait Duration:Rate Limiter Request Wait Duration 相关指标。 + +### Raft Waterfall + +- Store duration:Store duration 相关指标。 +- Apply duration:Apply duration 相关指标。 +- Store propose wait duration:Store propose wait duration 相关指标。 +- Store batch wait duration:Store batch wait duration 相关指标。 +- Store send to write queue duration:Store send to write queue duration 相关指标。 +- Store send proposal duration:Store send proposal duration 相关指标。 +- Store write kv db end duration:Store write kv db end duration 相关指标。 +- Store before write duration:Store before write duration 相关指标。 +- Store write end duration:Store write end duration 相关指标。 +- Store persist duration:Store persist duration 相关指标。 +- Store commit but not persist duration:Store commit but not persist duration 相关指标。 +- Store commit and persist duration:Store commit and persist duration 相关指标。 + +### Raftstore IO + +- Peer destroy kv write:Peer destroy kv write 相关指标。 +- 99% Peer destroy kv write:99% Peer destroy kv write 相关指标。 +- Peer destroy raft write:Peer destroy raft write 相关指标。 +- 99% Peer destroy raft write:99% Peer destroy raft write 相关指标。 +- Init raft state:Init raft state 相关指标。 +- 99% Init raft state:99% Init raft state 相关指标。 +- Init apply state:Init apply state 相关指标。 +- 99% Init apply state:99% Init apply state 相关指标。 +- Entry storage create:Entry storage create 相关指标。 +- 99% Entry storage create:99% Entry storage create 相关指标。 +- Store check msg:Store check msg 相关指标。 +- 99% Store check msg:99% Store check msg 相关指标。 +- Peer check merge target stale:Peer check merge target stale 相关指标。 +- 99% Peer check merge target stale:99% Peer check merge target stale 相关指标。 +- Peer maybe create:Peer maybe create 相关指标。 +- 99% Peer maybe create:99% Peer maybe create 相关指标。 +- Peer snapshot read:Peer snapshot read 相关指标。 +- 99% Peer snapshot read:99% Peer snapshot read 相关指标。 +- V2 compatible learner:V2 compatible learner 相关指标。 +- 99% V2 compatible learner:99% V2 compatible learner 相关指标。 +- Raft term:Raft term 相关指标。 +- 99% Raft term:99% Raft term 相关指标。 +- Raft fetch log:Raft fetch log 相关指标。 +- 99% Raft fetch log:99% Raft fetch log 相关指标。 + +### Raft IO + +- Process ready duration:Process ready duration 相关指标。 +- 99% Process ready duration per server:99% Process ready duration per server 相关指标。 +- Store write loop duration:Store write loop duration 相关指标。 +- 99% Store write loop duration per server:99% Store write loop duration per server 相关指标。 +- 99% Append log duration per server:99% Append log duration per server 相关指标。 +- 99% Commit log duration per server:99% Commit log duration per server 相关指标。 +- 99% Apply log duration per server:99% Apply log duration per server 相关指标。 +- Raft Client Wait Connection Ready Duration:Raft Client Wait Connection Ready Duration 相关指标。 +- 99% Raft Client Wait Connection Ready Duration:99% Raft Client Wait Connection Ready Duration 相关指标。 +- Store io task reschedule:Store io task reschedule 相关指标。 +- Write task block duration per server $optional_quantile:Write task block duration per server $optional_quantile 相关指标。 + +### Raft Propose + +- Raft proposals per ready:Raft proposals per ready 相关指标。 +- 99% Propose wait duration per server:99% Propose wait duration per server 相关指标。 +- Store write wait duration:Store write wait duration 相关指标。 +- 99% Store write wait duration per server:99% Store write wait duration per server 相关指标。 +- 99% Apply wait duration per server:99% Apply wait duration per server 相关指标。 +- Store write handle msg duration:Store write handle msg duration 相关指标。 +- Store write trigger size:Store write trigger size 相关指标。 +- Raft propose speed:Raft propose speed 相关指标。 +- Perf Context duration:Perf Context duration 相关指标。 + +### Raft Process + +- Fsm reschedule ops:Fsm reschedule ops 相关指标。 +- Store fsm schedule wait duration:Store fsm schedule wait duration 相关指标。 +- Apply fsm schedule wait duration:Apply fsm schedule wait duration 相关指标。 +- Store fsm poll duration:Store fsm poll duration 相关指标。 +- Apply fsm poll duration:Apply fsm poll duration 相关指标。 +- Store fsm poll round:Store fsm poll round 相关指标。 +- Apply fsm poll round:Apply fsm poll round 相关指标。 +- Store fsm count per poll:Store fsm count per poll 相关指标。 +- Apply fsm count per poll:Apply fsm count per poll 相关指标。 +- Apply msg length distribution:Apply msg length distribution 相关指标。 +- Enable apply unpersisted log region count:Enable apply unpersisted log region count 相关指标。 +- Apply ahead of persistence raft log count:Apply ahead of persistence raft log count 相关指标。 + +### Raft Message + +- Raft Message Send Wait duration:Raft Message Send Wait duration 相关指标。 +- 99% Raft Message Send Wait Duration:99% Raft Message Send Wait Duration 相关指标。 +- Raft Message Receive Delay duration:Raft Message Receive Delay duration 相关指标。 +- 99% Raft Message Receive Delay Duration:99% Raft Message Receive Delay Duration 相关指标。 + +### Raft Admin + +- Load base split event:Load base split event 相关指标。 +- Load base split duration:Load base split duration 相关指标。 +- Peer in Flashback State:Peer in Flashback State 相关指标。 + +### Raft Log + +- Raft log GC write duration:Raft log GC write duration 相关指标。 +- Raft log GC kv sync duration:Raft log GC kv sync duration 相关指标。 +- Raft log GC write operations:Raft log GC write operations 相关指标。 +- Raft log GC seek operations :Raft log GC seek operations 相关指标。 +- Raft log lag:Raft log lag 相关指标。 +- Raft log gc skipped:Raft log gc skipped 相关指标。 +- Raft log GC failed:Raft log GC failed 相关指标。 +- Raft log fetch :Raft log fetch 相关指标。 +- Raft log async fetch task duration:Raft log async fetch task duration 相关指标。 + +### Raft Engine + +- Operation:Operation 相关指标。 +- Flow:Flow 相关指标。 +- Write Duration Breakdown $optional_quantile:Write Duration Breakdown $optional_quantile 相关指标。 +- Bytes / Written:Bytes / Written 相关指标。 +- WAL Duration Breakdown (999%):WAL Duration Breakdown (999%) 相关指标。 +- File Count:File Count 相关指标。 +- Other Durations $optional_quantile:Other Durations $optional_quantile 相关指标。 +- Entry Count:Entry Count 相关指标。 +- Write Compression Ratio:Write Compression Ratio 相关指标。 + +### RocksDB - $db + +- Compaction guard actions:Compaction guard actions 相关指标。 +- Compaction reason:Compaction reason 相关指标。 +- Block cache operations:Block cache operations 相关指标。 +- Bytes / Read:Bytes / Read 相关指标。 +- Bytes / Write:Bytes / Write 相关指标。 +- Ingestion picked level:Ingestion picked level 相关指标。 +- Ingest SST allow_write:Ingest SST allow_write 相关指标。 +- Rocksdb block read count per second:Rocksdb block read count per second 相关指标。 +- Write Stall Reason:Write Stall Reason 相关指标。 + +### Titan - $titan_db + +- Blob cache size:Blob cache size 相关指标。 + +### In Memory Engine + +- Region Warmup Count:Region Warmup Count 相关指标。 +- Cached Region Coprocessor Requests:Cached Region Coprocessor Requests 相关指标。 +- Cached Region MVCC Amplification:Cached Region MVCC Amplification 相关指标。 +- Top Region Coprocessor Requests:Top Region Coprocessor Requests 相关指标。 +- Top Region MVCC Amplification:Top Region MVCC Amplification 相关指标。 + +### Flow Control + +- Flow controller factors:Flow controller factors 相关指标。 + +### Scheduler + +- Scheduler running commands:Scheduler running commands 相关指标。 +- Scheduler memory quota:Scheduler memory quota 相关指标。 +- Txn Scheduler Pool Wait Duration:Txn Scheduler Pool Wait Duration 相关指标。 +- Txn Scheduler Pool Exec Duration:Txn Scheduler Pool Exec Duration 相关指标。 + +### Scheduler Worker Pool + +- Running threads:Running threads 相关指标。 +- Duration of One Time Slice:Duration of One Time Slice 相关指标。 +- Task Execute Duration:Task Execute Duration 相关指标。 +- Task Schedule Times:Task Schedule Times 相关指标。 + +### Scheduler - $command + +- Scheduler command process duration:Scheduler command process duration 相关指标。 +- Scheduler command block read duration:Scheduler command block read duration 相关指标。 +- Check memory locks duration:Check memory locks duration 相关指标。 + +### Coprocessor Overview + +- Memory Quota:Memory Quota 相关指标。 + +### Coprocessor Detail + +- Handle duration by store:Handle duration by store 相关指标。 +- Wait duration by store:Wait duration by store 相关指标。 +- Memory lock checking duration:Memory lock checking duration 相关指标。 +- Memory lock checking duration:Memory lock checking duration 相关指标。 +- Semaphore waiting duration:Semaphore waiting duration 相关指标。 +- Semaphore waiting duration:Semaphore waiting duration 相关指标。 +- Semaphore waiting tasks count:Semaphore waiting tasks count 相关指标。 + +### Unified Read Pool + +- Running threads:Running threads 相关指标。 +- Duration of One Time Slice:Duration of One Time Slice 相关指标。 +- Task Execute Duration:Task Execute Duration 相关指标。 +- Task Schedule Times:Task Schedule Times 相关指标。 + +### GC + +- GC scan write details:GC scan write details 相关指标。 +- GC scan default details:GC scan default details 相关指标。 +- Auto Compaction Duration:Auto Compaction Duration 相关指标。 +- Auto Compaction Regions Status:Auto Compaction Regions Status 相关指标。 +- Auto Compaction Num Tombstones:Auto Compaction Num Tombstones 相关指标。 +- Auto Compaction Num Discardable:Auto Compaction Num Discardable 相关指标。 +- Auto Compaction MVCC Versions Scanned:Auto Compaction MVCC Versions Scanned 相关指标。 +- Auto Compaction Score:Auto Compaction Score 相关指标。 + +### Pessimistic Locking + +- Lock Waiting Queue:Lock Waiting Queue 相关指标。 +- Pessimistic lock activities:Pessimistic lock activities 相关指标。 +- Lengths of lock wait queues when transaction enqueues:Lengths of lock wait queues when transaction enqueues 相关指标。 +- In-memory scan lock read duration:In-memory scan lock read duration 相关指标。 + +### PD + +- PD reconnection:PD reconnection 相关指标。 +- PD forward status:PD forward status 相关指标。 +- Pending TSO Requests:Pending TSO Requests 相关指标。 + +### Slow Trend Statistics + +- Inspected duration per server:Inspected duration per server 相关指标。 +- Store Slow Score:Store Slow Score 相关指标。 +- Slow Trend:Slow Trend 相关指标。 +- QPS Changing Trend:QPS Changing Trend 相关指标。 +- AVG Sampling Latency:AVG Sampling Latency 相关指标。 +- QPS of each store:QPS of each store 相关指标。 + +### Snapshot + +- Snapshot generation/apply wait duration $optional_quantile:Snapshot generation/apply wait duration $optional_quantile 相关指标。 +- Handle snapshot duration $optional_quantile:Handle snapshot duration $optional_quantile 相关指标。 +- Snapshot Actions:Snapshot Actions 相关指标。 +- Snapshot transport speed:Snapshot transport speed 相关指标。 +- Snapshot pending applies:Snapshot pending applies 相关指标。 + +### Resolved TS + +- Resolved TS Worker CPU:Resolved TS Worker CPU 相关指标。 +- Advance ts Worker CPU:Advance ts Worker CPU 相关指标。 +- Max gap of follower safe-ts:Max gap of follower safe-ts 相关指标。 +- Min Safe TS Follower Region:Min Safe TS Follower Region 相关指标。 +- CheckLeader request region count $optional_quantile:CheckLeader request region count $optional_quantile 相关指标。 +- CheckLeader request size $optional_quantile:CheckLeader request size $optional_quantile 相关指标。 +- Fail advance ts count:Fail advance ts count 相关指标。 +- Initial scan backoff duration:Initial scan backoff duration 相关指标。 +- Observe region status:Observe region status 相关指标。 +- Pending command size:Pending command size 相关指标。 + +### Point In Time Restore + +- CPU Usage:CPU Usage 相关指标。 +- RPC Duration $optional_quantile:RPC Duration $optional_quantile 相关指标。 +- Import RPC Ops:Import RPC Ops 相关指标。 +- Import RPC Count:Import RPC Count 相关指标。 +- Cache Events:Cache Events 相关指标。 +- Overall RPC Duration:Overall RPC Duration 相关指标。 +- Read File into Memory Duration:Read File into Memory Duration 相关指标。 +- Queuing Time:Queuing Time 相关指标。 +- Apply Request Throughput:Apply Request Throughput 相关指标。 +- Downloaded File Size:Downloaded File Size 相关指标。 +- Apply Batch Size:Apply Batch Size 相关指标。 +- Blocked by Concurrency Time:Blocked by Concurrency Time 相关指标。 +- Apply Request Speed:Apply Request Speed 相关指标。 +- Cached File in Memory:Cached File in Memory 相关指标。 +- Engine Requests Unfinished:Engine Requests Unfinished 相关指标。 +- Apply Time:Apply Time 相关指标。 +- Raft Store Memory Usage:Raft Store Memory Usage 相关指标。 + +### Backup & Import + +- Backup CPU Utilization:Backup CPU Utilization 相关指标。 +- Backup Thread Count:Backup Thread Count 相关指标。 +- Backup Write CF SST Size:Backup Write CF SST Size 相关指标。 +- Backup Default CF SST Size:Backup Default CF SST Size 相关指标。 +- Backup SST Generation Throughput:Backup SST Generation Throughput 相关指标。 +- Backup Scan SST Duration:Backup Scan SST Duration 相关指标。 +- Backup Scan SST Duration:Backup Scan SST Duration 相关指标。 +- Backup Save SST Duration:Backup Save SST Duration 相关指标。 +- Backup SST Duration:Backup SST Duration 相关指标。 +- External Storage Create Duration:External Storage Create Duration 相关指标。 +- External Storage Create Duration:External Storage Create Duration 相关指标。 +- Checksum Request Duration:Checksum Request Duration 相关指标。 +- Import CPU Utilization:Import CPU Utilization 相关指标。 +- Import Thread Count:Import Thread Count 相关指标。 +- Import Errors:Import Errors 相关指标。 +- Import RPC Duration:Import RPC Duration 相关指标。 +- Import RPC Ops:Import RPC Ops 相关指标。 +- Import RPC Count:Import RPC Count 相关指标。 +- Import Write/Download RPC Duration:Import Write/Download RPC Duration 相关指标。 +- Import Wait Duration:Import Wait Duration 相关指标。 +- Import Read SST Duration:Import Read SST Duration 相关指标。 +- Import Rewrite SST Duration:Import Rewrite SST Duration 相关指标。 +- Import Ingest RPC Duration:Import Ingest RPC Duration 相关指标。 +- Import Ingest SST Duration:Import Ingest SST Duration 相关指标。 +- Import Ingest SST Bytes:Import Ingest SST Bytes 相关指标。 +- Import Download SST Throughput:Import Download SST Throughput 相关指标。 +- Import Local Write keys:Import Local Write keys 相关指标。 +- Import Local Write bytes:Import Local Write bytes 相关指标。 +- TTL Expired:TTL Expired 相关指标。 +- cloud request:cloud request 相关指标。 + +### Backup Log + +- Endpoint Status:Endpoint Status 相关指标。 +- Task Status:Task Status 相关指标。 +- Advancer Owner:Advancer Owner 相关指标。 +- Average Flush Size:Average Flush Size 相关指标。 +- Flushed Files (Last 30m) Per Host:Flushed Files (Last 30m) Per Host 相关指标。 +- Flush Times (Last 30m):Flush Times (Last 30m) 相关指标。 +- Total Flushed Size (Last 30m):Total Flushed Size (Last 30m) 相关指标。 +- Flush Files (Last 30m):Flush Files (Last 30m) 相关指标。 +- CPU Usage:CPU Usage 相关指标。 +- Checkpoint TS Lag:Checkpoint TS Lag 相关指标。 +- Resolve Region TS duration:Resolve Region TS duration 相关指标。 +- Internal Message Handling Duration $optional_quantile:Internal Message Handling Duration $optional_quantile 相关指标。 +- Internal Message Handling Duration (P90):Internal Message Handling Duration (P90) 相关指标。 +- Initial Scanning Task Status:Initial Scanning Task Status 相关指标。 +- Buffer File Cache Mem Usage:Buffer File Cache Mem Usage 相关指标。 +- Buffer File Count:Buffer File Count 相关指标。 +- Buffer File Swap out Bytes:Buffer File Swap out Bytes 相关指标。 +- Tick Duration:Tick Duration 相关指标。 +- Tick Duration $optional_quantile:Tick Duration $optional_quantile 相关指标。 +- Current Last Region ID:Current Last Region ID 相关指标。 +- Current Last Region Leader Store ID:Current Last Region Leader Store ID 相关指标。 +- Current Last Region ID per Store:Current Last Region ID per Store 相关指标。 +- Current Last Checkpoint TS per Store:Current Last Checkpoint TS per Store 相关指标。 +- Active Progress Subscrption Per Store:Active Progress Subscrption Per Store 相关指标。 + +### Memory + +- Send Allocated(+) / Release Received(-) Bytes Rate:Send Allocated(+) / Release Received(-) Bytes Rate 相关指标。 +- Allocated Bytes Rate per Thread:Allocated Bytes Rate per Thread 相关指标。 +- Released Bytes Rate per Thread:Released Bytes Rate per Thread 相关指标。 +- Mapped Allocation per Thread:Mapped Allocation per Thread 相关指标。 +- Arena Count:Arena Count 相关指标。 + +### Resource Control + +- Background Task Total Wait Duration:Background Task Total Wait Duration 相关指标。 +- Priority Quota Limit:Priority Quota Limit 相关指标。 +- Analyze read ops per second (total vs block read):Analyze read ops per second (total vs block read) 相关指标。 +- Analyze next batch count per second:Analyze next batch count per second 相关指标。 + +### Status Server + +- Status API Request Duration:Status API Request Duration 相关指标。 +- Status API Request (op/s):Status API Request (op/s) 相关指标。 + +### TTL + +- TTL expire count:TTL expire count 相关指标。 +- TTL expire size:TTL expire size 相关指标。 +- TTL check progress:TTL check progress 相关指标。 +- TTL checker actions:TTL checker actions 相关指标。 +- TTL checker compact duration:TTL checker compact duration 相关指标。 +- TTL checker poll interval:TTL checker poll interval 相关指标。 + +### Config + +- RocksDB DB Config:RocksDB DB Config 相关指标。 +- RocksDB CF Config:RocksDB CF Config 相关指标。 +- Flow Control Config:Flow Control Config 相关指标。 +- Raftstore Config:Raftstore Config 相关指标。 + ## TiKV-FastTune 面板 当 TiKV 出现 QPS 抖动、延迟抖动、延迟增加趋势等性能问题时,你可以查看 **TiKV-FastTune** 面板。**TiKV-FastTune** 包括多组子面板,可帮助你诊断性能问题,尤其适用于集群中写入负载较大的场景。