From 5df7774a46c3ab05a2802ddca993d8c9955d7b81 Mon Sep 17 00:00:00 2001 From: Neil Shen Date: Mon, 27 Jul 2020 17:03:36 +0800 Subject: [PATCH 1/5] faq: update backup and restore Signed-off-by: Neil Shen --- faq/deploy-and-maintain-faq.md | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/faq/deploy-and-maintain-faq.md b/faq/deploy-and-maintain-faq.md index e645a9af1b147..d703af1c8554a 100644 --- a/faq/deploy-and-maintain-faq.md +++ b/faq/deploy-and-maintain-faq.md @@ -399,7 +399,7 @@ Currently, some files of TiKV primary node have a higher compression rate, which TiKV implements the Column Family (CF) feature of RocksDB. By default, the KV data is eventually stored in the 3 CFs (default, write and lock) within RocksDB. -- The default CF stores real data and the corresponding parameter is in `[rocksdb.defaultcf]`. +- The default CF stores real data and the corresponding parameter is in `[rocksdb.defaultcf]`. - The write CF stores the data version information (MVCC) and index-related data, and the corresponding parameter is in `[rocksdb.writecf]`. - The lock CF stores the lock information and the system uses the default parameter. - The Raft RocksDB instance stores Raft logs. The default CF mainly stores Raft logs and the corresponding parameter is in `[raftdb.defaultcf]`. @@ -450,7 +450,7 @@ WAL belongs to ordered writing, and currently, we do not apply a unique configur - Cache strategy of RAID card and I/O scheduling strategy of the operating system: currently no specific best practices; you can use the default configuration in Linux 7 or later - NUMA: no specific suggestion; for memory allocation strategy, you can use `interleave = all` - File system: ext4 - + #### How is the write performance in the most strict data available mode (`sync-log = true`)? Generally, enabling `sync-log` reduces about 30% of the performance. For write performance when `sync-log` is set to `false`, see [Performance test result for TiDB using Sysbench](/benchmark/v3.0-performance-benchmarking-with-sysbench.md). @@ -513,11 +513,7 @@ TiDB is not suitable for tables of small size (such as below ten million level), #### How to back up data in TiDB? -Currently, the preferred method for backup is using the [PingCAP fork of Mydumper](/mydumper-overview.md). Although the official MySQL tool `mysqldump` is also supported in TiDB to back up and restore data, its performance is poorer than [`mydumper`](/mydumper-overview.md)/[`loader`](/loader-overview.md) and it needs much more time to back up and restore large volumes of data. - -Keep the size of the data file exported from `mydumper` as small as possible. It is recommended to keep the size within 64M. You can set value of the `-F` parameter to 64. - -You can edit the `t` parameter of `loader` based on the number of TiKV instances and load status. For example, in scenarios of three TiKV instances, you can set its value to `3 * (1 ~ n)`. When the TiKV load is very high and `backoffer.maxSleep 15000ms is exceeded` displays a lot in `loader` and TiDB logs, you can adjust the parameter to a smaller value. When the TiKV load is not very high, you can adjust the parameter to a larger value accordingly. +Currently, the preferred method for backup is using the [BR](/br/backup-and-restore-tool.md). Although the official MySQL tool `mysqldump` is also supported in TiDB to back up and restore data, its performance is poorer than [BR](/br/backup-and-restore-tool.md) and it needs much more time to back up and restore large volumes of data. ## Monitoring From 18eec821e5395006ab8dc04cf0411ef5297f4dcc Mon Sep 17 00:00:00 2001 From: TomShawn <41534398+TomShawn@users.noreply.github.com> Date: Tue, 28 Jul 2020 10:30:37 +0800 Subject: [PATCH 2/5] Update faq/deploy-and-maintain-faq.md Co-authored-by: Null not nil <67764674+nullnotnil@users.noreply.github.com> --- faq/deploy-and-maintain-faq.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/faq/deploy-and-maintain-faq.md b/faq/deploy-and-maintain-faq.md index d703af1c8554a..6530ff0f07db6 100644 --- a/faq/deploy-and-maintain-faq.md +++ b/faq/deploy-and-maintain-faq.md @@ -513,7 +513,7 @@ TiDB is not suitable for tables of small size (such as below ten million level), #### How to back up data in TiDB? -Currently, the preferred method for backup is using the [BR](/br/backup-and-restore-tool.md). Although the official MySQL tool `mysqldump` is also supported in TiDB to back up and restore data, its performance is poorer than [BR](/br/backup-and-restore-tool.md) and it needs much more time to back up and restore large volumes of data. +Currently, the preferred method for backup is using the [BR](/br/backup-and-restore-tool.md). Although the official MySQL tool `mysqldump` is also supported in TiDB to back up and restore data, its performance is worse than [BR](/br/backup-and-restore-tool.md) and it needs much more time to back up and restore large volumes of data. ## Monitoring From 33328384ac014c52593279c6373c519db9d827d6 Mon Sep 17 00:00:00 2001 From: yikeke Date: Thu, 30 Jul 2020 11:40:01 +0800 Subject: [PATCH 3/5] mention dumpling in BR doc --- br/backup-and-restore-tool.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/br/backup-and-restore-tool.md b/br/backup-and-restore-tool.md index 5089e943338e9..91a70f451b28f 100644 --- a/br/backup-and-restore-tool.md +++ b/br/backup-and-restore-tool.md @@ -6,7 +6,7 @@ aliases: ['/docs/dev/br/backup-and-restore-tool/','/docs/dev/reference/tools/br/ # Use BR to Back up and Restore Data -[Backup & Restore](http://github.com/pingcap/br) (BR) is a command-line tool for distributed backup and restoration of the TiDB cluster data. Compared with [`mydumper`/`loader`](/backup-and-restore-using-mydumper-lightning.md), BR is more suitable for scenarios of huge data volume. This document describes the BR command line, detailed use examples, best practices, restrictions, and introduces the implementation principles of BR. +[Backup & Restore](http://github.com/pingcap/br) (BR) is a command-line tool for distributed backup and restoration of the TiDB cluster data. Compared with [`dumpling`](backup-and-restore-using-dumpling-lightning.md) and [`mydumper`/`loader`](/backup-and-restore-using-mydumper-lightning.md), BR is more suitable for scenarios of huge data volume. This document describes the BR command line, detailed use examples, best practices, restrictions, and introduces the implementation principles of BR. ## Usage restrictions From bc98cf56ab9d29e50d7de55537dcee01a20f9c31 Mon Sep 17 00:00:00 2001 From: yikeke Date: Thu, 30 Jul 2020 11:50:59 +0800 Subject: [PATCH 4/5] replace a link temporarily --- br/backup-and-restore-tool.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/br/backup-and-restore-tool.md b/br/backup-and-restore-tool.md index 91a70f451b28f..deda0342da57a 100644 --- a/br/backup-and-restore-tool.md +++ b/br/backup-and-restore-tool.md @@ -6,7 +6,7 @@ aliases: ['/docs/dev/br/backup-and-restore-tool/','/docs/dev/reference/tools/br/ # Use BR to Back up and Restore Data -[Backup & Restore](http://github.com/pingcap/br) (BR) is a command-line tool for distributed backup and restoration of the TiDB cluster data. Compared with [`dumpling`](backup-and-restore-using-dumpling-lightning.md) and [`mydumper`/`loader`](/backup-and-restore-using-mydumper-lightning.md), BR is more suitable for scenarios of huge data volume. This document describes the BR command line, detailed use examples, best practices, restrictions, and introduces the implementation principles of BR. +[Backup & Restore](http://github.com/pingcap/br) (BR) is a command-line tool for distributed backup and restoration of the TiDB cluster data. Compared with [`dumpling`](export-or-backup-using-dumpling.md) and [`mydumper`/`loader`](/backup-and-restore-using-mydumper-lightning.md), BR is more suitable for scenarios of huge data volume. This document describes the BR command line, detailed use examples, best practices, restrictions, and introduces the implementation principles of BR. ## Usage restrictions From 51cae23ede6d63b8d76058092c3f790bbcf203de Mon Sep 17 00:00:00 2001 From: Keke Yi <40977455+yikeke@users.noreply.github.com> Date: Fri, 31 Jul 2020 13:30:41 +0800 Subject: [PATCH 5/5] Apply suggestions from code review --- br/backup-and-restore-tool.md | 2 +- faq/deploy-and-maintain-faq.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/br/backup-and-restore-tool.md b/br/backup-and-restore-tool.md index deda0342da57a..732be737d9e67 100644 --- a/br/backup-and-restore-tool.md +++ b/br/backup-and-restore-tool.md @@ -6,7 +6,7 @@ aliases: ['/docs/dev/br/backup-and-restore-tool/','/docs/dev/reference/tools/br/ # Use BR to Back up and Restore Data -[Backup & Restore](http://github.com/pingcap/br) (BR) is a command-line tool for distributed backup and restoration of the TiDB cluster data. Compared with [`dumpling`](export-or-backup-using-dumpling.md) and [`mydumper`/`loader`](/backup-and-restore-using-mydumper-lightning.md), BR is more suitable for scenarios of huge data volume. This document describes the BR command line, detailed use examples, best practices, restrictions, and introduces the implementation principles of BR. +[Backup & Restore](http://github.com/pingcap/br) (BR) is a command-line tool for distributed backup and restoration of the TiDB cluster data. Compared with [`dumpling`](/export-or-backup-using-dumpling.md) and [`mydumper`/`loader`](/backup-and-restore-using-mydumper-lightning.md), BR is more suitable for scenarios of huge data volume. This document describes the BR command line, detailed use examples, best practices, restrictions, and introduces the implementation principles of BR. ## Usage restrictions diff --git a/faq/deploy-and-maintain-faq.md b/faq/deploy-and-maintain-faq.md index 6530ff0f07db6..c18ee6ce9a3d5 100644 --- a/faq/deploy-and-maintain-faq.md +++ b/faq/deploy-and-maintain-faq.md @@ -513,7 +513,7 @@ TiDB is not suitable for tables of small size (such as below ten million level), #### How to back up data in TiDB? -Currently, the preferred method for backup is using the [BR](/br/backup-and-restore-tool.md). Although the official MySQL tool `mysqldump` is also supported in TiDB to back up and restore data, its performance is worse than [BR](/br/backup-and-restore-tool.md) and it needs much more time to back up and restore large volumes of data. +Currently, for the backup of a large volume of data, the preferred method is using [BR](/br/backup-and-restore-tool.md). Otherwise, the recommended tool is [Dumpling](/export-or-backup-using-dumpling.md). Although the official MySQL tool `mysqldump` is also supported in TiDB to back up and restore data, its performance is worse than [BR](/br/backup-and-restore-tool.md) and it needs much more time to back up and restore large volumes of data. ## Monitoring