From e84bb72c3bda63d8921700b2f9651e905b7d37c2 Mon Sep 17 00:00:00 2001 From: shichun-0415 <89768198+shichun-0415@users.noreply.github.com> Date: Tue, 22 Nov 2022 18:47:06 +0800 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Grace Cai --- tiflash/create-tiflash-replicas.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tiflash/create-tiflash-replicas.md b/tiflash/create-tiflash-replicas.md index 76017e39e8175..9ab44f5332816 100644 --- a/tiflash/create-tiflash-replicas.md +++ b/tiflash/create-tiflash-replicas.md @@ -133,9 +133,17 @@ SELECT TABLE_NAME FROM information_schema.tables where TABLE_SCHEMA = " ## Speed up TiFlash replication + + +> **Note:** +> +> This section is not applicable to TiDB Cloud. + + + Before TiFlash replicas are added, each TiKV instance performs a full table scan and sends the scanned data to TiFlash as a "snapshot" to create replicas. By default, TiFlash replicas are added slowly with fewer resources usage in order to minimize the impact on the online service. If there are spare CPU and disk IO resources in your TiKV and TiFlash nodes, you can accelerate TiFlash replication by performing the following steps. -1. Temporarily increase the snapshot write speed limit for each TiKV and TiFlash instance by using the [Dynamic Config SQL statement](/dynamic-config.md): +1. Temporarily increase the snapshot write speed limit for each TiKV and TiFlash instance by using the [Dynamic Config SQL statement](https://docs.pingcap.com/tidb/stable/dynamic-config): ```sql -- The default value for both configurations are 100MiB, i.e. the maximum disk bandwidth used for writing snapshots is no more than 100MiB/s. @@ -145,7 +153,7 @@ Before TiFlash replicas are added, each TiKV instance performs a full table scan After executing these SQL statements, the configuration changes take effect immediately without restarting the cluster. However, since the replication speed is still restricted by the PD limit globally, you cannot observe the acceleration for now. -2. Use [PD Control](/pd-control.md) to progressively ease the new replica speed limit. +2. Use [PD Control](https://docs.pingcap.com/tidb/stable/pd-control) to progressively ease the new replica speed limit. The default new replica speed limit is 30, which means, approximately 30 Regions add TiFlash replicas every minute. Executing the following command will adjust the limit to 60 for all TiFlash instances, which doubles the original speed: