From 9ecbe428aaa64758e357984cbfceea42162e4597 Mon Sep 17 00:00:00 2001 From: toutdesuite Date: Wed, 6 May 2020 18:56:15 +0800 Subject: [PATCH 1/4] tiflash: add more explanation for multi disk deployment --- how-to/deploy/orchestrated/tiup.md | 2 +- reference/tiflash/configuration.md | 10 +++++++++- reference/tiflash/deploy.md | 4 ++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/how-to/deploy/orchestrated/tiup.md b/how-to/deploy/orchestrated/tiup.md index 2331024bee73f..b5ba6f591a7a5 100644 --- a/how-to/deploy/orchestrated/tiup.md +++ b/how-to/deploy/orchestrated/tiup.md @@ -921,7 +921,7 @@ Key parameters of TiDB: | TiKV | 16 Vcore 32 GB * 3 | 10.0.1.1
10.0.1.2
10.0.1.3 | Default port configuration | |TiDB | 16 Vcore 32 GB * 3 | 10.0.1.7
10.0.1.8
10.0.1.9 | Default port configuration;
`enable_binlog` enabled;
`ignore-error` enabled | | PD | 4 Vcore 8 GB * 3| 10.0.1.4
10.0.1.5
10.0.1.6 | Default port configuration | -| TiFlash | 1 | 32 VCore 64 GB | 10.0.1.10 | Default port configuration;
Customized deployment directory - the `data_dir` parameter is set to `/data1/tiflash/data,/data2/tiflash/data` for multi-disk deployment | +| TiFlash | 32 VCore 64 GB * 1 | 10.0.1.10 | Default port configuration;
Customized deployment directory - the `data_dir` parameter is set to `/data1/tiflash/data,/data2/tiflash/data` for [multi-disk deployment](/reference/tiflash/configuration.md#multi-disk-deployment) | | Pump|8 Vcore 16GB * 3|10.0.1.6
10.0.1.7
10.0.1.8 | Default port configuration;
The GC time is set to 7 days | | Drainer | 8 Vcore 16GB | 10.0.1.9 | Default port configuration;
Set default initialization commitTS | diff --git a/reference/tiflash/configuration.md b/reference/tiflash/configuration.md index 5147bd7026208..868979680a759 100644 --- a/reference/tiflash/configuration.md +++ b/reference/tiflash/configuration.md @@ -28,7 +28,7 @@ This section introduces the configuration parameters of TiFlash. ``` tmp_path = The path in which the TiFlash temporary files are stored. -path = The TiFlash data storage path. # If there are multiple directories, separate each directory with a comma. For example, `/ssd_a/data/tiflash,/hdd_b/data/tiflash,/hdd_c/data/tiflash`. If your environment has multiple disks, it is recommended that each path corresponds to one disk and you put disks with best performance at the front to fully use performance of all disks. +path = The TiFlash data storage path. # If there are multiple directories, separate each directory with a comma. path_realtime_mode = false # The default value is `false`. If you set it to `true` and multiple directories are deployed in the path, the latest data is stored in the first directory and older data is stored in the rest directories. listen_host = The TiFlash service listening host. # Generally, it is configured as `0.0.0.0`. tcp_port = The TiFlash TCP service port. @@ -78,3 +78,11 @@ Multiple TiFlash nodes elect a master to add or delete placement rules to PD, an engine-addr = The listening address of the TiFlash coprocessor service. status-addr = The port and IP through which Prometheus pulls proxy metrics information. ``` + +### Multi-disk deployment + +TiFlash supports multi-disk deployment, controlled by the two parameters `path` and `path_realtime_mode` in the [`tiflash.toml` file](#configure-the-tiflashtoml-file). + +If there are multiple data storage directories in `path`, separate each with a comma. For example, `/ssd_a/data/tiflash,/hdd_b/data/tiflash,/hdd_c/data/tiflash`. If there are multiple disks in your environment, it is recommended that each directory corresponds to one disk and you put disks with the best performance at the front to maximize the performance of all disks. + +The default value of the `path_realtime_mode` parameter is `false`, which means that data are balanced among all storage directories. If the parameter is set to `true`, and `path` contains multiple directories, it means that the first directory only stores the latest data, and the older data are balanced among other directories. diff --git a/reference/tiflash/deploy.md b/reference/tiflash/deploy.md index 8eae4e45e0b53..5c2d3e898b5b1 100644 --- a/reference/tiflash/deploy.md +++ b/reference/tiflash/deploy.md @@ -27,7 +27,7 @@ It is recommended to use an SSD disk to buffer the real-time data being replicat For other hard disks, you can use multiple HDDs or regular SSDs. A better hard disk will surely bring better performance. -TiFlash supports multi-directory storage, so there is no need to use RAID. +TiFlash supports [multi-disk deployment](/reference/tiflash/configuration.md#multi-disk-deployment), so there is no need to use RAID. ### TiFlash and TiKV are deployed on the same node @@ -97,7 +97,7 @@ TiUP cluster is the deployment tool for TiDB 4.0 or later versions. It is recomm - host: 172.19.0.103 ``` - If you want to customize the deployment directory, configure the `data_dir` parameter. If you want to deploy TiFlash on multiple disks, separate each directory with commas. For example: + If you want to customize the deployment directory, configure the `data_dir` parameter. If you want to [deploy TiFlash on multiple disks](/reference/tiflash/configuration.md#multi-disk-deployment), separate each directory with commas. For example: {{< copyable "" >}} From 1ffe20c45371f542c4710f153e182d02a304ca3f Mon Sep 17 00:00:00 2001 From: toutdesuite Date: Wed, 6 May 2020 20:55:05 +0800 Subject: [PATCH 2/4] Update how-to/deploy/orchestrated/tiup.md Co-authored-by: Keke Yi <40977455+yikeke@users.noreply.github.com> --- how-to/deploy/orchestrated/tiup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/how-to/deploy/orchestrated/tiup.md b/how-to/deploy/orchestrated/tiup.md index b5ba6f591a7a5..dbf8cdc67c3a2 100644 --- a/how-to/deploy/orchestrated/tiup.md +++ b/how-to/deploy/orchestrated/tiup.md @@ -921,7 +921,7 @@ Key parameters of TiDB: | TiKV | 16 Vcore 32 GB * 3 | 10.0.1.1
10.0.1.2
10.0.1.3 | Default port configuration | |TiDB | 16 Vcore 32 GB * 3 | 10.0.1.7
10.0.1.8
10.0.1.9 | Default port configuration;
`enable_binlog` enabled;
`ignore-error` enabled | | PD | 4 Vcore 8 GB * 3| 10.0.1.4
10.0.1.5
10.0.1.6 | Default port configuration | -| TiFlash | 32 VCore 64 GB * 1 | 10.0.1.10 | Default port configuration;
Customized deployment directory - the `data_dir` parameter is set to `/data1/tiflash/data,/data2/tiflash/data` for [multi-disk deployment](/reference/tiflash/configuration.md#multi-disk-deployment) | +| TiFlash | 32 VCore 64 GB | 10.0.1.10 | Default port configuration;
Customized deployment directory - the `data_dir` parameter is set to `/data1/tiflash/data,/data2/tiflash/data` for [multi-disk deployment](/reference/tiflash/configuration.md#multi-disk-deployment) | | Pump|8 Vcore 16GB * 3|10.0.1.6
10.0.1.7
10.0.1.8 | Default port configuration;
The GC time is set to 7 days | | Drainer | 8 Vcore 16GB | 10.0.1.9 | Default port configuration;
Set default initialization commitTS | From 1ddd2e98e7406211cf7513918591a229766c917b Mon Sep 17 00:00:00 2001 From: toutdesuite Date: Wed, 6 May 2020 20:55:22 +0800 Subject: [PATCH 3/4] Update reference/tiflash/configuration.md Co-authored-by: Keke Yi <40977455+yikeke@users.noreply.github.com> --- reference/tiflash/configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/tiflash/configuration.md b/reference/tiflash/configuration.md index 868979680a759..bd1ec355bdd85 100644 --- a/reference/tiflash/configuration.md +++ b/reference/tiflash/configuration.md @@ -81,7 +81,7 @@ Multiple TiFlash nodes elect a master to add or delete placement rules to PD, an ### Multi-disk deployment -TiFlash supports multi-disk deployment, controlled by the two parameters `path` and `path_realtime_mode` in the [`tiflash.toml` file](#configure-the-tiflashtoml-file). +TiFlash supports multi-disk deployment, controlled by the `path` and `path_realtime_mode` parameters in the [`tiflash.toml` file](#configure-the-tiflashtoml-file). If there are multiple data storage directories in `path`, separate each with a comma. For example, `/ssd_a/data/tiflash,/hdd_b/data/tiflash,/hdd_c/data/tiflash`. If there are multiple disks in your environment, it is recommended that each directory corresponds to one disk and you put disks with the best performance at the front to maximize the performance of all disks. From bdb624b7fbd5a117869dee389a21cf86ff3bf449 Mon Sep 17 00:00:00 2001 From: toutdesuite Date: Wed, 6 May 2020 20:56:04 +0800 Subject: [PATCH 4/4] Update reference/tiflash/configuration.md Co-authored-by: Keke Yi <40977455+yikeke@users.noreply.github.com> --- reference/tiflash/configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/tiflash/configuration.md b/reference/tiflash/configuration.md index bd1ec355bdd85..4eb09d754466a 100644 --- a/reference/tiflash/configuration.md +++ b/reference/tiflash/configuration.md @@ -85,4 +85,4 @@ TiFlash supports multi-disk deployment, controlled by the `path` and `path_realt If there are multiple data storage directories in `path`, separate each with a comma. For example, `/ssd_a/data/tiflash,/hdd_b/data/tiflash,/hdd_c/data/tiflash`. If there are multiple disks in your environment, it is recommended that each directory corresponds to one disk and you put disks with the best performance at the front to maximize the performance of all disks. -The default value of the `path_realtime_mode` parameter is `false`, which means that data are balanced among all storage directories. If the parameter is set to `true`, and `path` contains multiple directories, it means that the first directory only stores the latest data, and the older data are balanced among other directories. +The default value of the `path_realtime_mode` parameter is `false`, which means that data are evenly distributed on all storage directories. If the parameter is set to `true`, and `path` contains multiple directories, it means that the first directory only stores the latest data, and the older data are evenly distributed on other directories.