Skip to content

Commit 397721d

Browse files
Add mintso config parameters (#19452)
1 parent d3738c3 commit 397721d

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

tiflash/tiflash-configuration.md

+9
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,15 @@ delta_index_cache_size = 0
264264
## New in v7.4.0. This item controls whether to enable the TiFlash resource control feature. When it is set to true, TiFlash uses the pipeline execution model.
265265
enable_resource_control = true
266266

267+
## New in v6.0.0. This item is used for the MinTSO scheduler. It specifies the maximum number of threads that one resource group can use. The default value is 5000. For details about the MinTSO scheduler, see https://docs.pingcap.com/tidb/dev/tiflash-mintso-scheduler.
268+
task_scheduler_thread_soft_limit = 5000
269+
270+
## New in v6.0.0. This item is used for the MinTSO scheduler. It specifies the maximum number of threads in the global scope. The default value is 10000. For details about the MinTSO scheduler, see https://docs.pingcap.com/tidb/dev/tiflash-mintso-scheduler.
271+
task_scheduler_thread_hard_limit = 10000
272+
273+
## New in v6.4.0. This item is used for the MinTSO scheduler. It specifies the maximum number of queries that can run simultaneously in a TiFlash instance. The default value is 0, which means twice the number of vCPUs. For details about the MinTSO scheduler, see https://docs.pingcap.com/tidb/dev/tiflash-mintso-scheduler.
274+
task_scheduler_active_set_soft_limit = 0
275+
267276
## Security settings take effect starting from v4.0.5.
268277
[security]
269278
## New in v5.0. This configuration item enables or disables log redaction. Value options: `true`, `false`, `"on"`, `"off"`, and `"marker"`. The `"on"`, `"off"`, and `"marker"` options are introduced in v8.2.0.

tiflash/tiflash-mintso-scheduler.md

+4
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,7 @@ The scheduling process of the MinTSO Scheduler is as follows:
6262
![TiFlash MinTSO Scheduler v2](/media/tiflash/tiflash_mintso_v2.png)
6363

6464
By introducing soft limit and hard limit, the MinTSO scheduler effectively avoids system deadlock while controlling the number of system threads. In high concurrency scenarios, however, most queries might only have part of their MPP tasks scheduled. Queries with only part of MPP tasks scheduled cannot execute normally, leading to low system execution efficiency. To avoid this situation, TiFlash introduces a query-level limit for the MinTSO scheduler, called active_set_soft_limit. This limit allows only MPP tasks of up to active_set_soft_limit queries to participate in scheduling; MPP tasks of other queries do not participate in scheduling, and only after the current queries finish can new queries participate in scheduling. This limit is only a soft limit because for the MinTSO query, all its MPP tasks can be scheduled directly as long as the number of system threads does not exceed the hard limit.
65+
66+
# See also
67+
68+
- [Configure TiFlash](/tiflash/tiflash-configuration.md): learn how to configure the MinTSO scheduler.

0 commit comments

Comments
 (0)