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

tikv: add some new online configurations #8676

Merged
merged 11 commits into from
Mar 25, 2022
5 changes: 3 additions & 2 deletions dynamic-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ show warnings;

| 配置项 | 简介 |
| --- | --- |
| raftstore.raft-entry-max-size | 单个日志最大大小 |
| raftstore.raft-max-inflight-msgs | 待确认的日志个数,如果超过这个数量,Raft 状态机会减缓发送日志的速度 |
| raftstore.raft-log-gc-tick-interval | 删除 Raft 日志的轮询任务调度间隔时间 |
| raftstore.raft-log-gc-threshold | 允许残余的 Raft 日志个数,软限制 |
| raftstore.raft-log-gc-count-limit | 允许残余的 Raft 日志个数,硬限制 |
Expand Down Expand Up @@ -157,6 +157,7 @@ show warnings;
| raftstore.store-pool-size | 处理 Raft 的线程池中线程的数量,即 Raftstore 线程池的大小 |
| raftstore.apply-max-batch-size | Raft 状态机由 BatchSystem 批量执行数据写入请求,该配置项指定每批可执行请求的最多 Raft 状态机个数。 |
| raftstore.store-max-batch-size | Raft 状态机由 BatchSystem 批量执行日志落盘请求,该配置项指定每批可执行请求的最多 Raft 状态机个数。 |
| readpool.unified.max-thread-count | 统一处理读请求的线程池最多的线程数量,即 UnifyReadPool 线程池大小 |
| coprocessor.split-region-on-table | 开启按 table 分裂 Region 的开关 |
| coprocessor.batch-split-limit | 批量分裂 Region 的阈值 |
| coprocessor.region-max-size | Region 容量空间的最大值 |
Expand Down Expand Up @@ -314,4 +315,4 @@ select @@tidb_slow_log_threshold;
| mem-quota-query | tidb_mem_quota_query | 查询语句的内存使用限制 |
| log.enable-slow-log | tidb_enable_slow_log | 慢日志的开关 |
| log.slow-threshold | tidb_slow_log_threshold | 慢日志阈值 |
| log.expensive-threshold | tidb_expensive_query_time_threshold | expensive 查询阈值 |
| log.expensive-threshold | tidb_expensive_query_time_threshold | expensive 查询阈值 |
9 changes: 6 additions & 3 deletions tikv-configuration-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,9 @@ TiKV 配置文件比命令行参数支持更多的选项。你可以在 [etc/con
### `max-thread-count`

+ 统一处理读请求的线程池最多的线程数量,即 UnifyReadPool 线程池的大小。调整该线程池的大小时,请参考 [TiKV 线程池调优](/tune-tikv-thread-performance.md#tikv-线程池调优)。
+ 默认值:CPU * 0.8,但最少为 4
+ 可调整范围:`[min-thread-count, MAX(4, CPU)]`。其中,`MAX(4, CPU)` 表示:如果 CPU 核心数量小于 `4`,取 `4`;如果 CPU 核心数量大于 `4`,则取 CPU 核心数量。

+ 默认值:MAX(4, CPU * 0.8)

### `stack-size`

Expand Down Expand Up @@ -525,7 +527,7 @@ raftstore 相关的配置项。
>
> 该配置项不支持通过 SQL 语句查询,但支持在配置文件中进行配置。

+ 待确认日志个数的数量,如果超过这个数量将会减缓发送日志的个数
+ 待确认的日志个数,如果超过这个数量,Raft 状态机会减缓发送日志的速度
+ 默认值:256
+ 最小值:大于 0

Expand Down Expand Up @@ -753,7 +755,7 @@ raftstore 相关的配置项。

### `apply-pool-size`

+ 处理数据落盘的线程池中线程的数量。调整该线程池的大小时,请参考 [TiKV 线程池调优](/tune-tikv-thread-performance.md#tikv-线程池调优)。
+ 处理数据落盘的线程池中线程的数量,即 Apply 线程池的大小。调整该线程池的大小时,请参考 [TiKV 线程池调优](/tune-tikv-thread-performance.md#tikv-线程池调优)。
+ 默认值:2
+ 最小值:大于 0

Expand Down Expand Up @@ -1488,6 +1490,7 @@ Raft Engine 相关的配置项。

+ 处理备份的工作线程数量。
+ 默认值:CPU * 0.5,但最大为 8
+ 可调整范围:[1, CPU]
+ 最小值:1

### `enable-auto-tune` <span class="version-mark">从 v5.4 版本开始引入</span>
Expand Down