Skip to content

Commit

Permalink
dumpling: add a note about compression (#8738) (#8747)
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-chi-bot authored Mar 24, 2022
1 parent bcc91c6 commit cdae36d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion dumpling-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,8 @@ Dumpling 也可以通过 `-B` 或 `-T` 选项导出特定的数据库/数据表
默认情况下,导出的文件会存储到 `./export-<current local time>` 目录下。常用选项如下:

- `-t` 用于指定导出的线程数。增加线程数会增加 Dumpling 并发度提高导出速度,但也会加大数据库内存消耗,因此不宜设置过大。
- `-r` 选项用于指定单个文件的最大记录数,或者说,数据库中的行数。开启后 Dumpling 会开启表内并发,提高导出大表的速度。
- `-r` 选项用于指定单个文件的最大记录数,或者说,数据库中的行数。开启后 Dumpling 会开启表内并发,提高导出大表的速度。当上游为 TiDB 且版本为 v3.0 或更新版本时,该参数大于 0 表示使用 TiDB region 信息划分表内并发,具体取值将不再生效。
- `--compress gzip` 选项可以用于压缩导出的数据。压缩可以显著降低导出数据的大小,同时如果存储的写入 I/O 带宽不足,可以使用该选项来加速导出。但该选项也有副作用,由于该选项会对每个文件单独压缩,因此会增加 CPU 消耗。

利用以上选项可以提高 Dumpling 的导出速度。

Expand Down
2 changes: 1 addition & 1 deletion tidb-lightning/tidb-lightning-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ max-allowed-packet = 67_108_864
# 注意:考虑到与旧版本的兼容性,依然可以在本配置项设置 `true` 和 `false` 两个布尔值,其效果与 "required" 和 `off` 相同。
checksum = "required"
# 配置是否在 CHECKSUM 结束后对所有表逐个执行 `ANALYZE TABLE <table>` 操作。
# 此配置的可选配置项与 `post-restore` 相同,但默认值为 "optional"。
# 此配置的可选配置项与 `checksum` 相同,但默认值为 "optional"。
analyze = "optional"
# 如果设置为 true,会在导入每张表后执行一次 level-1 Compact。
# 默认值为 false。
Expand Down

0 comments on commit cdae36d

Please sign in to comment.