Skip to content

Commit a21fc36

Browse files
holyskennytm
authored andcommitted
remove deprecated worker-pool-size option from configuration (pingcap#58)
* remove deprecated worker-pool-size option from configuration * address comment
1 parent f3f109f commit a21fc36

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

docs/tidb-lightning-user-guide.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ The following are the hardware requirements for deploying one set of TiDB Lighti
5757
- 16 GB+ memory
5858
- 1 TB+ SSD
5959
- 10 Gigabit network card
60-
- Need to be deployed separately from the online business because TiDB Lighting fully consumes the CPU during runtime. Under certain circumstances, you can deploy it along with another component (like `tidb-server`) on one machine and configure to limit the CPU usage of `tidb-lightning`. See the `worker-pool-size` part in the first step of [Deploy `tidb-lightning`](#deploy-tidb-lightning).
60+
- Need to be deployed separately from the online business because TiDB Lighting fully consumes the CPU during runtime. Under certain circumstances, you can deploy it along with another component (like `tidb-server`) on one machine and configure to limit the CPU usage of `tidb-lightning`. See the `region-concurrency` part in the first step of [Deploy `tidb-lightning`](#deploy-tidb-lightning).
6161
6262
- tikv-importer
6363
@@ -76,9 +76,9 @@ Under certain circumstances, you can deploy `tidb-lightning` and `tikv-importer`
7676
- 1 TB+ SSD
7777
- 10 Gigabit network card
7878
79-
> **Note:** `tidb-lightning` is CPU intensive. If you use mixed deployment for it, you need to configure `worker-pool-size` to limit the number of occupied CPU cores of `tidb-lightning`. Otherwise other applications may be affected.
79+
> **Note:** `tidb-lightning` is CPU intensive. If you use mixed deployment for it, you need to configure `region-concurrency` to limit the number of occupied CPU cores of `tidb-lightning`. Otherwise other applications may be affected.
8080
81-
> You can configure the `worker-pool-size` parameter of `tidb-lightning` to allocate 75% of CPU resources to `tidb-lightning`. For example, if CPU has 32 logical cores, you can set `worker-pool-size` to 24.
81+
> You can configure the `region-concurrency` parameter of `tidb-lightning` to allocate 75% of CPU resources to `tidb-lightning`. For example, if CPU has 32 logical cores, you can set `region-concurrency` to 24.
8282
8383
### Prepare
8484
@@ -168,9 +168,14 @@ For details, see [Deploy TiDB Using Ansible](https://pingcap.com/docs/op-guide/a
168168
# background profile for debugging ( 0 to disable )
169169
pprof-port = 10089
170170
171-
# change the concurrency number of data. It is set to the number of logical CPU cores by default and needs no configuration.
171+
172+
# table-concurrency controls the maximum handled tables concurrently while reading Mydumper SQL files. It can affect the tikv-importer memory usage amount.
173+
table-concurrency = 8
174+
# region-concurrency changes the concurrency number of data. It is set to the number of logical CPU cores by default and needs no configuration.
172175
# in mixed configuration, you can set it to 75% of the size of logical CPU cores.
173-
# worker-pool-size =
176+
# region-concurrency default to runtime.NumCPU()
177+
# region-concurrency =
178+
174179
175180
# logging
176181
level = "info"

lightning/config/config.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ func (c *Config) String() string {
6161

6262
type Lightning struct {
6363
common.LogConfig
64-
WorkerPoolSize int `toml:"worker-pool-size" json:"worker-pool-size"`
6564
TableConcurrency int `toml:"table-concurrency" json:"table-concurrency"`
6665
RegionConcurrency int `toml:"region-concurrency" json:"region-concurrency"`
6766
ProfilePort int `toml:"pprof-port" json:"pprof-port"`
@@ -89,7 +88,6 @@ type TikvImporter struct {
8988
func NewConfig() *Config {
9089
return &Config{
9190
App: Lightning{
92-
WorkerPoolSize: runtime.NumCPU(),
9391
RegionConcurrency: runtime.NumCPU(),
9492
TableConcurrency: 8,
9593
},

tidb-lightning.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44
# background profile for debuging ( 0 to disable )
55
pprof-port = 10089
66

7-
# number of workers to restore tables (default to `runtime.NumCPU()`).
8-
# worker-pool-size =
7+
8+
# table-concurrency controls the maximum handled tables concurrently while reading Mydumper SQL files. It can affect the tikv-importer memory usage.
99
table-concurrency = 8
10+
# region-concurrency changes the concurrency number of data. It is set to the number of logical CPU cores by default and needs no configuration.
11+
# In mixed configuration, you can set it to 75% of the size of logical CPU cores.
1012
# region-concurrency default to runtime.NumCPU()
1113
# region-concurrency =
1214

0 commit comments

Comments
 (0)