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 configuration: update io_rate_limit #6176

Merged
Merged
Changes from 1 commit
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
34 changes: 27 additions & 7 deletions tiflash/tiflash-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,9 @@ delta_index_cache_size = 0

## Storage paths settings take effect starting from v4.0.9
[storage]
## [Experimental] New in v5.0. This item limits the total write rate of background tasks in bytes per second. It is not recommended to use this experimental feature in a production environment.
## The unit is bytes. Currently, the setting such as "10GB" is not supported.
## The default value is 0, which means no limit.
## This parameter is used to control the usage of machine disk bandwidth by background tasks mainly for the scenario where TiFlash is deployed on the AWS EBS (gp2/gp3) disk.
## This parameter can be used to improve the stability of the TiFlash query performance. The recommended configuration in this scenario is 50% of the disk bandwidth.
## It is not recommended to modify this configuration in other scenarios.
bg_task_io_rate_limit = 0
## This configuration item is deprecated since v5.2.0. You can use `[storage.io_rate_limit]` settings below if needed.
en-jin19 marked this conversation as resolved.
Show resolved Hide resolved

# bg_task_io_rate_limit = 0

[storage.main]
## The list of directories to store the main data. More than 90% of the total data is stored in
Expand All @@ -100,6 +96,30 @@ delta_index_cache_size = 0
## If it is not set, or is set to multiple 0, the actual disk (the disk where the directory is located) capacity is used.
# capacity = [ 10737418240, 10737418240 ]

## [storage.io_rate_limit] settings (New in v5.2.0)
en-jin19 marked this conversation as resolved.
Show resolved Hide resolved
[storage.io_rate_limit]
## This configuration item determines whether to limit I/O traffic. By default, the I/O traffic is not limited. You can use the TiFlash I/O traffic limit for the cloud storage that has disk bandwidth in a small and specific size.
en-jin19 marked this conversation as resolved.
Show resolved Hide resolved
## For the overall I/O bandwidth for disk reads and writes, the unit of it is bytes, and its default value is 0, which means the I/O traffic is not limited by default.
en-jin19 marked this conversation as resolved.
Show resolved Hide resolved
# max_bytes_per_sec = 0
## `max_read_bytes_per_sec` and `max_write_bytes_per_sec` have similar meanings to `max_bytes_per_sec`. `max_read_bytes_per_sec` refers the overall I/O bandwidth for disk reads, while `max_write_bytes_per_sec` means the overall I/O bandwidth for disk writes.
en-jin19 marked this conversation as resolved.
Show resolved Hide resolved
## These configuration items limit I/O bandwidth for disk reads and writes seperately. You can use them for cloud storages that calculate the limit of I/O bandwidth for disk reads and writes seperately, such as Persistent Disk provided by Google Cloud Platform.
en-jin19 marked this conversation as resolved.
Show resolved Hide resolved
## When the value of `max_bytes_per_sec` is not `0`, prioritize the use of `max_bytes_per_sec`.
en-jin19 marked this conversation as resolved.
Show resolved Hide resolved
# max_read_bytes_per_sec = 0
# max_write_bytes_per_sec = 0

## The following parameters control the bandwidth weights assigned to different I/O traffic types. Generally, you do not need to adjust these parameters.
## TiFlash internally divides I/O requests into four types: foreground writes, background writes, foreground reads, background reads.
## When I/O traffic limit is initialized, TiFlash allocates the bandwidth according to the following weight ratio.
en-jin19 marked this conversation as resolved.
Show resolved Hide resolved
## The following default configurations indicate that each type of traffic gets a weight of 25% (25 / (25 + 25 + 25 + 25) = 25%).
## If the weight is configured to `0`, the corresponding I/O traffic is not limited.
# foreground_write_weight = 25
# background_write_weight = 25
# foreground_read_weight = 25
# background_read_weight = 25
## TiFlash supports automatic adjustment of limiting different I/O traffic types according to the current I/O load. Sometimes, the actual bindwidth weight might exceed the weight ratio set above.
en-jin19 marked this conversation as resolved.
Show resolved Hide resolved
## `auto_tune_sec` indicates the interval of automatic adjustment. The unit is seconds. If the value of `auto_tune_sec` is `0`, the automatic adjustment is disabled.
en-jin19 marked this conversation as resolved.
Show resolved Hide resolved
# auto_tune_sec = 5

[flash]
tidb_status_addr = TiDB status port and address. # Multiple addresses are separated with commas.
service_addr = The listening address of TiFlash Raft services and coprocessor services.
Expand Down