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

grafana: supply the explanation on the metrics of Flow-Control in TiKV. #15670

Merged
merged 6 commits into from
Dec 18, 2023
Merged
Show file tree
Hide file tree
Changes from 5 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
15 changes: 15 additions & 0 deletions grafana-tikv-dashboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,21 @@ aliases: ['/docs-cn/dev/grafana-tikv-dashboard/','/docs-cn/dev/reference/key-mon

![TiKV Dashboard - Storage metrics](/media/tikv-dashboard-storage.png)

### Flow Control

- Scheduler flow:每个 TiKV 实例的 scheduler 的实时流量
- Scheduler discard ratio:每个 TiKV 实例的 scheduler 的请求拒绝比率。如果该比例不为 0,则表明存在流控。当 Compaction pending bytes 超过阈值时,TiKV 会根据超过阈值部分的值,按比例线性增加 Scheduler discard ratio。被拒绝的请求将自动由客户端重试
- Throttle duration:L0 文件过多并触发流控后,scheduler 执行请求的阻塞时间。如果存在统计值,则表明存在流控
- Scheduler throttled CF:由于达到流控阈值,触发 RocksDB 限流的 CF
- Flow controller actions:由于达到流控阈值,触发 RocksDB 限流的原因
- Flush/L0 flow:每个 TiKV 实例上 RocksDB 的不同 CF 的 Flush 流量和 L0 compaction 的流量
- Flow control factors:触发 RocksDB 限流相关的因素
- Compaction pending bytes:每个 TiKV 实例上 RocksDB 实时等待 compaction 的数据的大小
- Txn command throttled duration:由于限流,与事务相关的命令的阻塞时间,正常情况下,该指标为 0
- Non-txn command throttled duration:由于限流,其他命令的阻塞时间,正常情况下,该指标为 0

![TiKV Dashboard - Flow Control metrics](/media/tikv-dashboard-flow-control.png)

### Scheduler

- Scheduler stage total:每种命令不同阶段的 ops,正常情况下,不会在短时间内出现大量的错误
Expand Down
Binary file added media/tikv-dashboard-flow-control.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.