Skip to content

dumpling: update dumpling document on how to reduce memory usage#5860

Merged
ti-chi-bot merged 3 commits into
pingcap:masterfrom
lichunzhu:updateDumplingDoc
Apr 6, 2021
Merged

dumpling: update dumpling document on how to reduce memory usage#5860
ti-chi-bot merged 3 commits into
pingcap:masterfrom
lichunzhu:updateDumplingDoc

Conversation

@lichunzhu
Copy link
Copy Markdown
Contributor

First-time contributors' checklist

What is changed, added or deleted? (Required)

Update dumpling document on how to reduce memory usage. Make sure users can get this important infomation.

Which TiDB version(s) do your changes apply to? (Required)

  • master (the latest development version)
  • v5.0 (TiDB 5.0 versions)
  • v4.0 (TiDB 4.0 versions)
  • v3.1 (TiDB 3.1 versions)
  • v3.0 (TiDB 3.0 versions)
  • v2.1 (TiDB 2.1 versions)

What is the related PR or file link(s)?

  • This PR is translated from:
  • Other reference link(s):

Do your changes match any of the following descriptions?

  • Delete files
  • Change aliases
  • Need modification after applied to another branch
  • Might cause conflicts after applied to another branch

@ti-chi-bot ti-chi-bot added missing-translation-status This PR does not have translation status info. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Mar 26, 2021
@TomShawn
Copy link
Copy Markdown
Contributor

/translation doing

@ti-chi-bot ti-chi-bot added translation/doing This PR’s assignee is translating this PR. and removed missing-translation-status This PR does not have translation status info. labels Mar 26, 2021
@TomShawn
Copy link
Copy Markdown
Contributor

/label needs-cherry-pick-4.0
/label needs-cherry-pick-5.0
/status PTAL
/size small
/assign TomShawn
/label require-LGT1

@ti-chi-bot ti-chi-bot added status/PTAL This PR is ready for reviewing. size/small Changes of a small size. needs-cherry-pick-4.0 require-LGT1 Indicates that the PR requires an LGTM. labels Mar 26, 2021
@TomShawn
Copy link
Copy Markdown
Contributor

@lichunzhu Please involve a technical review~

@TomShawn
Copy link
Copy Markdown
Contributor

/cc 3pointer overvenus

Comment thread dumpling-overview.md
--filetype sql \
--threads 32 \
-o /tmp/test \
-r 200000 \
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's too large and may cause TiDB OOM.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we suggest TiDB uses 1GB memory, and the default threads is 4, then avg_row_length is
1GB / 4 / 200000 = 1342. It's more than 1KB. In most conditions avg_row_length is less than this.

Comment thread dumpling-overview.md
--filetype sql \
--threads 32 \
-o /tmp/test \
-r 200000 \
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also add -r to other examples, e.g., ### 导出到 csv 文件

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added in 0c0706b

@ti-chi-bot ti-chi-bot removed the size/small Changes of a small size. label Mar 29, 2021
@overvenus
Copy link
Copy Markdown
Member

/lgtm

@ti-chi-bot
Copy link
Copy Markdown
Member

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • overvenus

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Details

Reviewer can indicate their review by writing /lgtm in a comment.
Reviewer can cancel approval by writing /lgtm cancel in a comment.

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Mar 29, 2021
Comment thread dumpling-overview.md Outdated

> **注意:**
>
> 导出较大表(单表大小超过 10 GB)时 `-r`, `-F` 参数均**强烈建议**开启。
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-r -F 不能同时生效,也描述下吧

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

现在是可以同时生效的

@3pointer
Copy link
Copy Markdown
Contributor

/lgtm

@overvenus
Copy link
Copy Markdown
Member

@TomShawn PTAL, thanks!

Comment thread dumpling-overview.md Outdated
Comment thread dumpling-overview.md Outdated
Comment thread dumpling-overview.md Outdated
Comment thread dumpling-overview.md Outdated

> **注意:**
>
> 导出较大表(单表大小超过 10 GB)时 `-r`, `-F` 参数均**强烈建议**开启。
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> 导出较大表(单表大小超过 10 GB)时 `-r`, `-F` 参数均**强烈建议**开启
> 如果导出的单表大小超过 10 GB**强烈建议**指定 `-r``-F` 参数

Comment thread dumpling-overview.md Outdated
Comment thread dumpling-overview.md Outdated
Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com>
@TomShawn
Copy link
Copy Markdown
Contributor

TomShawn commented Apr 6, 2021

/lgtm

@TomShawn
Copy link
Copy Markdown
Contributor

TomShawn commented Apr 6, 2021

/merge

@ti-chi-bot
Copy link
Copy Markdown
Member

This pull request has been accepted and is ready to merge.

DetailsCommit hash: 6df2aa6

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Apr 6, 2021
@ti-chi-bot ti-chi-bot merged commit b8655e3 into pingcap:master Apr 6, 2021
ti-srebot pushed a commit to ti-srebot/docs-cn that referenced this pull request Apr 6, 2021
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot
Copy link
Copy Markdown
Contributor

cherry pick to release-4.0 in PR #5962

ti-srebot pushed a commit to ti-srebot/docs-cn that referenced this pull request Apr 6, 2021
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot
Copy link
Copy Markdown
Contributor

cherry pick to release-5.0 in PR #5963

@TomShawn
Copy link
Copy Markdown
Contributor

/translation done
/remove-translation doing

@ti-chi-bot ti-chi-bot added translation/done This PR has been translated from English into Chinese and updated to pingcap/docs-cn in a PR. and removed translation/doing This PR’s assignee is translating this PR. labels Apr 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

require-LGT1 Indicates that the PR requires an LGTM. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT1 Indicates that a PR has LGTM 1. status/PTAL This PR is ready for reviewing. translation/done This PR has been translated from English into Chinese and updated to pingcap/docs-cn in a PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants