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

TiFlash io rate limit configuration. #6820

Merged
merged 23 commits into from
Aug 13, 2021
Merged
Changes from 3 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
46e9080
TiFlash io rate limit configuration.
JinheLin Aug 6, 2021
6ef1a63
Deprecated experimental parameter: bg_task_io_rate_limit
JinheLin Aug 9, 2021
cb41da4
Add desc.
JinheLin Aug 9, 2021
726bd39
Update tiflash/tiflash-configuration.md
JinheLin Aug 10, 2021
e5b47c7
Update tiflash/tiflash-configuration.md
JinheLin Aug 10, 2021
564ced4
Update tiflash/tiflash-configuration.md
JinheLin Aug 10, 2021
2d08673
Update tiflash/tiflash-configuration.md
JinheLin Aug 12, 2021
14ae0bb
Update tiflash/tiflash-configuration.md
JinheLin Aug 12, 2021
6596222
Update tiflash/tiflash-configuration.md
JinheLin Aug 12, 2021
de6c0ca
Update tiflash/tiflash-configuration.md
JinheLin Aug 12, 2021
6f72291
Update tiflash/tiflash-configuration.md
JinheLin Aug 12, 2021
ae809b6
Update tiflash/tiflash-configuration.md
JinheLin Aug 12, 2021
94bcd0c
Update tiflash/tiflash-configuration.md
JinheLin Aug 12, 2021
bfac861
Update tiflash/tiflash-configuration.md
JinheLin Aug 12, 2021
7c6e698
Update tiflash/tiflash-configuration.md
JinheLin Aug 12, 2021
d5c3793
Update tiflash/tiflash-configuration.md
JinheLin Aug 12, 2021
eaaf12d
Update tiflash-configuration.md
JinheLin Aug 12, 2021
383da93
Update tiflash-configuration.md
JinheLin Aug 12, 2021
6390d88
Update tiflash/tiflash-configuration.md
TomShawn Aug 12, 2021
c2a8be5
Update tiflash/tiflash-configuration.md
flowbehappy Aug 13, 2021
77826e5
Update tiflash/tiflash-configuration.md
flowbehappy Aug 13, 2021
e107b94
Update tiflash/tiflash-configuration.md
flowbehappy Aug 13, 2021
a27320f
Update tiflash/tiflash-configuration.md
TomShawn Aug 13, 2021
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
37 changes: 29 additions & 8 deletions tiflash/tiflash-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,7 @@ delta_index_cache_size = 0

## 存储路径相关配置,从 v4.0.9 开始生效
[storage]
## [实验特性] 自 v5.0 引入,限制后台任务每秒写入的字节数。目前为实验特性,不推荐在生产环境中使用。
## 以 byte 为单位。目前不支持如 "10GB" 的设置。
## 默认为 0,代表没有限制。
## 该参数主要针对 TiFlash 部署在 AWS EBS (gp2/gp3) 盘时的场景,用于控制后台任务对机器磁盘带宽的占用。
## 提升 TiFlash 查询性能的稳定性。在该场景下推荐配置为磁盘带宽的 50%。
## 其他场景下不建议修改该配置。
bg_task_io_rate_limit = 0
## 废弃实验参数:bg_task_io_rate_limit

[storage.main]
## 用于存储主要的数据,该目录列表中的数据占总数据的 90% 以上。
Expand All @@ -86,6 +80,33 @@ delta_index_cache_size = 0
## storage.latest.dir 存储目录列表中,每个目录的最大可用容量。
# capacity = [ 10737418240, 10737418240 ]

[storage.io_rate_limit]
## IO 限流功能主要针对磁盘带宽较小且明确知道磁盘带宽大小的云盘场景,默认关闭。
## IO 限流的读写总带宽,单位:Byte。默认值 0,关闭 IO 限流功能。
# max_bytes_per_sec = 0
## max_read_bytes_per_sec 和 max_write_bytes_per_sec 的含义和 max_bytes_per_sec 类似。
## 只是这里的读写带宽限制是分开的,适用于一些读写带宽限制是分开计算的云盘,比如 GCP 上的 persistent disk。
# max_read_bytes_per_sec = 0
# max_write_bytes_per_sec = 0

## 下面的参数,一般不需要调整
## TiFlash 内部将 IO 请求分成 4 种类型:前台写、后台写、前台读、后台读。IO 限流初始化时,会根据下面的权重(weight)
## 比例分配带宽。如果 weight 配置为 0,则对应的 IO 操作不会被 IO 限流。
# foreground_write_weight = 25
# background_write_weight = 25
# foreground_read_weight = 25
# background_read_weight = 25
## TiFlash 支持自动根据当前的 IO 负载情况自动调整各种 IO 类型的限流带宽。
## auto_tune_sec 表示自动调整逻辑的执行间隔,单位:second。0 表示关闭自动调整。
# auto_tune_sec = 5
## IO 带宽占用的百分比的水位线,用于自动调整逻辑,一般不需要调整。
# emergency_pct = 96
# high_pct = 85
# medium_pct = 60
## IO 带宽调整的限制参数,一般不需要调整
# tune_base = 2
# min_bytes_per_sec = 2097152

[flash]
tidb_status_addr = tidb status 端口地址 # 多个地址以逗号分割
service_addr = TiFlash raft 服务 和 coprocessor 服务监听地址
Expand Down Expand Up @@ -188,4 +209,4 @@ TiDB v4.0.9 及之后的版本中,TiFlash 支持将存储引擎的主要数据
> **警告:**
>
> * `[storage]` 参数从 TiUP v1.2.5 版本开始支持。如果你的 TiDB 版本为 v4.0.9 及以上,请确保你的 TiUP 版本不低于 v1.2.5,否则 `[storage]` 中定义的数据目录不会被 TiUP 纳入管理。
> * 在 TiFlash 节点改为使用 `[storage]` 配置后,如果将集群版本降级到低于 v4.0.9,可能导致 TiFlash 部分数据丢失。
> * 在 TiFlash 节点改为使用 `[storage]` 配置后,如果将集群版本降级到低于 v4.0.9,可能导致 TiFlash 部分数据丢失。