Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dumpling: add a note about compression #8738

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions dumpling-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ Dumpling 也可以通过 `-B` 或 `-T` 选项导出特定的数据库/数据表

- `-t` 用于指定导出的线程数。增加线程数会增加 Dumpling 并发度提高导出速度,但也会加大数据库内存消耗,因此不宜设置过大。
- `-r` 选项用于指定单个文件的最大记录数,或者说,数据库中的行数。开启后 Dumpling 会开启表内并发,提高导出大表的速度。当上游为 TiDB 且版本为 v3.0 或更新版本时,该参数大于 0 表示使用 TiDB region 信息划分表内并发,具体取值将不再生效。
- `--compress gzip` 选项可以用于压缩导出的数据。如果存储是瓶颈,或者存储容量是个问题,可以使用该选项来加速导出。但该选项也有副作用,由于该选项会对每个文件单独压缩,因此会增加 CPU 消耗。
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

利用以上选项可以提高 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 @@ -293,7 +293,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。
Expand Down