From e7ca89a6e09edec8e46cbcc4c43910245f4e412b Mon Sep 17 00:00:00 2001 From: Wenbo Zhang Date: Tue, 15 Mar 2022 17:56:13 +0800 Subject: [PATCH 01/10] tikv: add some new online configurations Signed-off-by: Wenbo Zhang --- dynamic-config.md | 2 ++ tikv-configuration-file.md | 2 ++ 2 files changed, 4 insertions(+) diff --git a/dynamic-config.md b/dynamic-config.md index 6e89844f3038..a9329a285729 100644 --- a/dynamic-config.md +++ b/dynamic-config.md @@ -123,6 +123,7 @@ show warnings; | 配置项 | 简介 | | --- | --- | +| raftstore.raft-max-inflight-msgs | 待确认日志个数的数量,如果超过这个数量将会减缓发送日志的个数 | | raftstore.raft-entry-max-size | 单个日志最大大小 | | raftstore.raft-log-gc-tick-interval | 删除 Raft 日志的轮询任务调度间隔时间 | | raftstore.raft-log-gc-threshold | 允许残余的 Raft 日志个数,软限制 | @@ -154,6 +155,7 @@ show warnings; | raftstore.hibernate-timeout | 启动后进入静默状态前需要等待的最短时间,在该时间段内不会进入静默状态(未 release)| | raftstore.apply-pool-size | apply 线程池大小 | | raftstore.store-pool-size | store 线程池大小 | +| readpool.unified.max-thread-count | 统一处理读请求的线程池最多的线程数量 | | coprocessor.split-region-on-table | 开启按 table 分裂 Region 的开关 | | coprocessor.batch-split-limit | 批量分裂 Region 的阈值 | | coprocessor.region-max-size | Region 容量空间的最大值 | diff --git a/tikv-configuration-file.md b/tikv-configuration-file.md index 5931c2dfa84a..c307f447c3fd 100644 --- a/tikv-configuration-file.md +++ b/tikv-configuration-file.md @@ -212,6 +212,7 @@ TiKV 配置文件比命令行参数支持更多的选项。你可以在 [etc/con ### `max-thread-count` + 统一处理读请求的线程池最多的线程数量,即 UnifyReadPool 线程池的大小。调整该线程池的大小时,请参考 [TiKV 线程池调优](/tune-tikv-thread-performance.md#tikv-线程池调优)。 ++ 可调整范围:`min-thread-count` ~ `max(初始 max-thread-count, CPU)` + 默认值:CPU * 0.8,但最少为 4 ### `stack-size` @@ -1489,6 +1490,7 @@ Raft Engine 相关的配置项。 + 处理备份的工作线程数量。 + 默认值:CPU * 0.5,但最大为 8 ++ 可调整范围:1 ~ CPU + 最小值:1 ### `enable-auto-tune` 从 v5.4 版本开始引入 From 676d22b38aa7b92e736701d4912116cf42605cbf Mon Sep 17 00:00:00 2001 From: Wenbo Zhang Date: Wed, 16 Mar 2022 21:25:41 +0800 Subject: [PATCH 02/10] tikv: remove one online configuration Signed-off-by: Wenbo Zhang --- dynamic-config.md | 1 - 1 file changed, 1 deletion(-) diff --git a/dynamic-config.md b/dynamic-config.md index a9329a285729..08463f0b884e 100644 --- a/dynamic-config.md +++ b/dynamic-config.md @@ -124,7 +124,6 @@ show warnings; | 配置项 | 简介 | | --- | --- | | raftstore.raft-max-inflight-msgs | 待确认日志个数的数量,如果超过这个数量将会减缓发送日志的个数 | -| raftstore.raft-entry-max-size | 单个日志最大大小 | | raftstore.raft-log-gc-tick-interval | 删除 Raft 日志的轮询任务调度间隔时间 | | raftstore.raft-log-gc-threshold | 允许残余的 Raft 日志个数,软限制 | | raftstore.raft-log-gc-count-limit | 允许残余的 Raft 日志个数,硬限制 | From c91c1ceab5d658a15ecc05188437a1e53b029592 Mon Sep 17 00:00:00 2001 From: en-jin19 Date: Tue, 22 Mar 2022 11:59:44 +0800 Subject: [PATCH 03/10] update dynamic-config parts --- dynamic-config.md | 8 ++++---- tikv-configuration-file.md | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dynamic-config.md b/dynamic-config.md index 08463f0b884e..31e13863bcff 100644 --- a/dynamic-config.md +++ b/dynamic-config.md @@ -123,7 +123,7 @@ show warnings; | 配置项 | 简介 | | --- | --- | -| raftstore.raft-max-inflight-msgs | 待确认日志个数的数量,如果超过这个数量将会减缓发送日志的个数 | +| 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 日志个数,硬限制 | @@ -152,9 +152,9 @@ show warnings; | raftstore.cleanup-import-sst-interval | 触发检查过期 SST 文件的时间间隔 | | raftstore.local-read-batch-size | 一轮处理读请求的最大个数 | | raftstore.hibernate-timeout | 启动后进入静默状态前需要等待的最短时间,在该时间段内不会进入静默状态(未 release)| -| raftstore.apply-pool-size | apply 线程池大小 | -| raftstore.store-pool-size | store 线程池大小 | -| readpool.unified.max-thread-count | 统一处理读请求的线程池最多的线程数量 | +| raftstore.apply-pool-size | Apply 线程池大小 | +| raftstore.store-pool-size | Store 线程池大小 | +| readpool.unified.max-thread-count | UnifyReadPool 线程池的大小(统一处理读请求的线程池最多的线程数量) | | coprocessor.split-region-on-table | 开启按 table 分裂 Region 的开关 | | coprocessor.batch-split-limit | 批量分裂 Region 的阈值 | | coprocessor.region-max-size | Region 容量空间的最大值 | diff --git a/tikv-configuration-file.md b/tikv-configuration-file.md index c307f447c3fd..00ea36e12852 100644 --- a/tikv-configuration-file.md +++ b/tikv-configuration-file.md @@ -212,7 +212,7 @@ TiKV 配置文件比命令行参数支持更多的选项。你可以在 [etc/con ### `max-thread-count` + 统一处理读请求的线程池最多的线程数量,即 UnifyReadPool 线程池的大小。调整该线程池的大小时,请参考 [TiKV 线程池调优](/tune-tikv-thread-performance.md#tikv-线程池调优)。 -+ 可调整范围:`min-thread-count` ~ `max(初始 max-thread-count, CPU)` ++ 可调整范围:[`min-thread-count`](#min-thread-count) ~ `max(初始 max-thread-count, CPU)` + 默认值:CPU * 0.8,但最少为 4 ### `stack-size` @@ -529,7 +529,7 @@ raftstore 相关的配置项。 > > 该配置项不支持通过 SQL 语句查询,但支持在配置文件中进行配置。 -+ 待确认日志个数的数量,如果超过这个数量将会减缓发送日志的个数。 ++ 待确认的日志个数,如果超过这个数量,Raft 状态机会减缓发送日志的个数。 + 默认值:256 + 最小值:大于 0 @@ -756,7 +756,7 @@ raftstore 相关的配置项。 ### `apply-pool-size` -+ 处理数据落盘的线程池中线程的数量。调整该线程池的大小时,请参考 [TiKV 线程池调优](/tune-tikv-thread-performance.md#tikv-线程池调优)。 ++ 处理数据落盘的线程池中线程的数量,即 Apply 线程池大小。调整该线程池的大小时,请参考 [TiKV 线程池调优](/tune-tikv-thread-performance.md#tikv-线程池调优)。 + 默认值:2 + 最小值:大于 0 From 0988a0d8dc727bfe5b90e70b3f3ee416b6603979 Mon Sep 17 00:00:00 2001 From: en-jin19 Date: Tue, 22 Mar 2022 13:17:09 +0800 Subject: [PATCH 04/10] update description in dynamic-config --- dynamic-config.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dynamic-config.md b/dynamic-config.md index 31e13863bcff..090518306864 100644 --- a/dynamic-config.md +++ b/dynamic-config.md @@ -152,9 +152,9 @@ show warnings; | raftstore.cleanup-import-sst-interval | 触发检查过期 SST 文件的时间间隔 | | raftstore.local-read-batch-size | 一轮处理读请求的最大个数 | | raftstore.hibernate-timeout | 启动后进入静默状态前需要等待的最短时间,在该时间段内不会进入静默状态(未 release)| -| raftstore.apply-pool-size | Apply 线程池大小 | -| raftstore.store-pool-size | Store 线程池大小 | -| readpool.unified.max-thread-count | UnifyReadPool 线程池的大小(统一处理读请求的线程池最多的线程数量) | +| raftstore.apply-pool-size | 处理数据落盘的线程池中线程的数量,即 Apply 线程池大小 | +| raftstore.store-pool-size | 处理 Raft 的线程池中线程的数量,即 Raftstore 线程池的大小 | +| readpool.unified.max-thread-count | 统一处理读请求的线程池最多的线程数量,即 UnifyReadPool 线程池大小 | | coprocessor.split-region-on-table | 开启按 table 分裂 Region 的开关 | | coprocessor.batch-split-limit | 批量分裂 Region 的阈值 | | coprocessor.region-max-size | Region 容量空间的最大值 | @@ -310,4 +310,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 查询阈值 | \ No newline at end of file From 3b118a98807449082ca14917dc2a2696d3725546 Mon Sep 17 00:00:00 2001 From: en-jin19 Date: Tue, 22 Mar 2022 14:43:28 +0800 Subject: [PATCH 05/10] update descriptions --- dynamic-config.md | 2 +- tikv-configuration-file.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dynamic-config.md b/dynamic-config.md index 090518306864..99f42e5deea3 100644 --- a/dynamic-config.md +++ b/dynamic-config.md @@ -123,7 +123,7 @@ show warnings; | 配置项 | 简介 | | --- | --- | -| raftstore.raft-max-inflight-msgs | 待确认的日志个数,如果超过这个数量,Raft 状态机将会减缓发送日志的个数 | +| 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 日志个数,硬限制 | diff --git a/tikv-configuration-file.md b/tikv-configuration-file.md index 00ea36e12852..60c2a82b1b03 100644 --- a/tikv-configuration-file.md +++ b/tikv-configuration-file.md @@ -212,7 +212,7 @@ TiKV 配置文件比命令行参数支持更多的选项。你可以在 [etc/con ### `max-thread-count` + 统一处理读请求的线程池最多的线程数量,即 UnifyReadPool 线程池的大小。调整该线程池的大小时,请参考 [TiKV 线程池调优](/tune-tikv-thread-performance.md#tikv-线程池调优)。 -+ 可调整范围:[`min-thread-count`](#min-thread-count) ~ `max(初始 max-thread-count, CPU)` ++ 可调整范围:`min-thread-count` ~ `max(4, CPU)` + 默认值:CPU * 0.8,但最少为 4 ### `stack-size` @@ -756,7 +756,7 @@ raftstore 相关的配置项。 ### `apply-pool-size` -+ 处理数据落盘的线程池中线程的数量,即 Apply 线程池大小。调整该线程池的大小时,请参考 [TiKV 线程池调优](/tune-tikv-thread-performance.md#tikv-线程池调优)。 ++ 处理数据落盘的线程池中线程的数量,即 Apply 线程池的大小。调整该线程池的大小时,请参考 [TiKV 线程池调优](/tune-tikv-thread-performance.md#tikv-线程池调优)。 + 默认值:2 + 最小值:大于 0 From e243b6788ee68b4e8be6b1b6036d7506f603e6cb Mon Sep 17 00:00:00 2001 From: Enwei Date: Tue, 22 Mar 2022 19:45:28 +0800 Subject: [PATCH 06/10] add a description --- tikv-configuration-file.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tikv-configuration-file.md b/tikv-configuration-file.md index 60c2a82b1b03..5078addfeb2e 100644 --- a/tikv-configuration-file.md +++ b/tikv-configuration-file.md @@ -212,8 +212,11 @@ TiKV 配置文件比命令行参数支持更多的选项。你可以在 [etc/con ### `max-thread-count` + 统一处理读请求的线程池最多的线程数量,即 UnifyReadPool 线程池的大小。调整该线程池的大小时,请参考 [TiKV 线程池调优](/tune-tikv-thread-performance.md#tikv-线程池调优)。 -+ 可调整范围:`min-thread-count` ~ `max(4, CPU)` -+ 默认值:CPU * 0.8,但最少为 4 ++ 可调整范围:`min-thread-count` ~ `MAX(4, CPU)` + + + `MAX(4, CPU)`:如果 4 > CPU,取 4;如果 4 < CPU,则取 CPU。 + ++ 默认值:MAX(4, CPU * 0.8) ### `stack-size` From 8e0d8c0b9dbe8ee699d022251d6746c9a537414f Mon Sep 17 00:00:00 2001 From: Enwei Date: Thu, 24 Mar 2022 16:49:41 +0800 Subject: [PATCH 07/10] Apply suggestions from code review Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com> --- dynamic-config.md | 2 +- tikv-configuration-file.md | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dynamic-config.md b/dynamic-config.md index 99f42e5deea3..18514af4b890 100644 --- a/dynamic-config.md +++ b/dynamic-config.md @@ -123,7 +123,7 @@ show warnings; | 配置项 | 简介 | | --- | --- | -| raftstore.raft-max-inflight-msgs | 待确认的日志个数,如果超过这个数量,Raft 状态机会减缓发送日志的个数 | +| 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 日志个数,硬限制 | diff --git a/tikv-configuration-file.md b/tikv-configuration-file.md index 5078addfeb2e..239beaa43c7f 100644 --- a/tikv-configuration-file.md +++ b/tikv-configuration-file.md @@ -212,9 +212,9 @@ TiKV 配置文件比命令行参数支持更多的选项。你可以在 [etc/con ### `max-thread-count` + 统一处理读请求的线程池最多的线程数量,即 UnifyReadPool 线程池的大小。调整该线程池的大小时,请参考 [TiKV 线程池调优](/tune-tikv-thread-performance.md#tikv-线程池调优)。 -+ 可调整范围:`min-thread-count` ~ `MAX(4, CPU)` ++ 可调整范围:`[min-thread-count, MAX(4, CPU)]` - + `MAX(4, CPU)`:如果 4 > CPU,取 4;如果 4 < CPU,则取 CPU。 + + `MAX(4, CPU)`:如果 CPU 核心数量小于 `4`,取 `4`;如果 CPU 核心数量大于 `4`,则取 CPU 核心数量。 + 默认值:MAX(4, CPU * 0.8) @@ -532,7 +532,7 @@ raftstore 相关的配置项。 > > 该配置项不支持通过 SQL 语句查询,但支持在配置文件中进行配置。 -+ 待确认的日志个数,如果超过这个数量,Raft 状态机会减缓发送日志的个数。 ++ 待确认的日志个数,如果超过这个数量,Raft 状态机会减缓发送日志的速度。 + 默认值:256 + 最小值:大于 0 @@ -1493,7 +1493,7 @@ Raft Engine 相关的配置项。 + 处理备份的工作线程数量。 + 默认值:CPU * 0.5,但最大为 8 -+ 可调整范围:1 ~ CPU ++ 可调整范围:`[1, CPU]` + 最小值:1 ### `enable-auto-tune` 从 v5.4 版本开始引入 From a8941c286dd5899f514e384118c79f08f5c1645c Mon Sep 17 00:00:00 2001 From: Enwei Date: Thu, 24 Mar 2022 17:13:46 +0800 Subject: [PATCH 08/10] Apply suggestions from code review --- tikv-configuration-file.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tikv-configuration-file.md b/tikv-configuration-file.md index 239beaa43c7f..8d68c62535f4 100644 --- a/tikv-configuration-file.md +++ b/tikv-configuration-file.md @@ -1493,7 +1493,7 @@ Raft Engine 相关的配置项。 + 处理备份的工作线程数量。 + 默认值:CPU * 0.5,但最大为 8 -+ 可调整范围:`[1, CPU]` ++ 可调整范围:[1, CPU] + 最小值:1 ### `enable-auto-tune` 从 v5.4 版本开始引入 From e0fd856856923e823b096bc93533e6fe3e31bb73 Mon Sep 17 00:00:00 2001 From: Enwei Date: Fri, 25 Mar 2022 11:26:09 +0800 Subject: [PATCH 09/10] Apply suggestions from code review (update descriptions) Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com> --- tikv-configuration-file.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tikv-configuration-file.md b/tikv-configuration-file.md index b31c5b256be0..b4e39b48146e 100644 --- a/tikv-configuration-file.md +++ b/tikv-configuration-file.md @@ -212,9 +212,7 @@ TiKV 配置文件比命令行参数支持更多的选项。你可以在 [etc/con ### `max-thread-count` + 统一处理读请求的线程池最多的线程数量,即 UnifyReadPool 线程池的大小。调整该线程池的大小时,请参考 [TiKV 线程池调优](/tune-tikv-thread-performance.md#tikv-线程池调优)。 -+ 可调整范围:`[min-thread-count, MAX(4, CPU)]` - - + `MAX(4, CPU)`:如果 CPU 核心数量小于 `4`,取 `4`;如果 CPU 核心数量大于 `4`,则取 CPU 核心数量。 ++ 可调整范围:`[min-thread-count, MAX(4, CPU)]`。其中,`MAX(4, CPU)` 表示:如果 CPU 核心数量小于 `4`,取 `4`;如果 CPU 核心数量大于 `4`,则取 CPU 核心数量。 + 默认值:MAX(4, CPU * 0.8) From 05ce6d9febb7ce9db9c097c0e61b98f08e383601 Mon Sep 17 00:00:00 2001 From: Enwei Date: Fri, 25 Mar 2022 11:26:34 +0800 Subject: [PATCH 10/10] revise format --- tikv-configuration-file.md | 1 - 1 file changed, 1 deletion(-) diff --git a/tikv-configuration-file.md b/tikv-configuration-file.md index b4e39b48146e..34957629e33f 100644 --- a/tikv-configuration-file.md +++ b/tikv-configuration-file.md @@ -213,7 +213,6 @@ TiKV 配置文件比命令行参数支持更多的选项。你可以在 [etc/con + 统一处理读请求的线程池最多的线程数量,即 UnifyReadPool 线程池的大小。调整该线程池的大小时,请参考 [TiKV 线程池调优](/tune-tikv-thread-performance.md#tikv-线程池调优)。 + 可调整范围:`[min-thread-count, MAX(4, CPU)]`。其中,`MAX(4, CPU)` 表示:如果 CPU 核心数量小于 `4`,取 `4`;如果 CPU 核心数量大于 `4`,则取 CPU 核心数量。 - + 默认值:MAX(4, CPU * 0.8) ### `stack-size`