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

importinto: add more logs to external backend, disable parallel sort #47680

Merged
merged 4 commits into from
Oct 17, 2023

Conversation

D3Hunter
Copy link
Contributor

What problem does this PR solve?

Issue Number: ref #47572

Problem Summary:

What is changed and how it works?

add more logs to external backend, disable parallel sort to speed up encode&sort

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)

with a case of 150g, import takes 58m after vs 70m before, mainly speed up encode&sort step. and CPU curve became more smooth.
after
image
before
image

flush log looks like this:

[2023/10/16 16:27:57.768 +00:00] [INFO] [writer.go:445] ["flush kv"] [bytes=268339017] [kv-cnt=18160] [stat-size=42504] [sort-time=250.47596ms] [write-time=1.781394854s] [sort-speed(kv/s)=72.5kB] [write-speed(bytes/s)=143.7MiB] [writerID=data/56625710-9837-4c0e-a3f1-b35490f9a008]
[2023/10/16 16:27:57.963 +00:00] [INFO] [writer.go:445] ["flush kv"] [bytes=268339452] [kv-cnt=18160] [stat-size=42504] [sort-time=53.950553ms] [write-time=1.635531465s] [sort-speed(kv/s)=336.6kB] [write-speed(bytes/s)=156.5MiB] [writerID=data/22a1c4ea-b6aa-4a39-9896-b4a461578107]
  • No need to test
    • I checked and no code files have been changed.

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 16, 2023
@tiprow
Copy link

tiprow bot commented Oct 16, 2023

Hi @D3Hunter. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@codecov
Copy link

codecov bot commented Oct 16, 2023

Codecov Report

Merging #47680 (5d5b3f1) into master (5ac13d9) will increase coverage by 0.9072%.
Report is 1 commits behind head on master.
The diff coverage is 72.0000%.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #47680        +/-   ##
================================================
+ Coverage   71.8864%   72.7936%   +0.9072%     
================================================
  Files          1398       1421        +23     
  Lines        405057     411459      +6402     
================================================
+ Hits         291181     299516      +8335     
+ Misses        94266      93097      -1169     
+ Partials      19610      18846       -764     
Flag Coverage Δ
integration 41.3432% <0.0000%> (?)
unit 71.8897% <72.0000%> (+0.0033%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 53.9913% <ø> (ø)
parser ∅ <ø> (∅)
br 48.6969% <75.0000%> (-4.2216%) ⬇️

@D3Hunter
Copy link
Contributor Author

/retest

@tiprow
Copy link

tiprow bot commented Oct 17, 2023

@D3Hunter: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Oct 17, 2023
@D3Hunter
Copy link
Contributor Author

/retest

@tiprow
Copy link

tiprow bot commented Oct 17, 2023

@D3Hunter: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@@ -474,7 +505,6 @@ func (w *Writer) flushKVs(ctx context.Context, fromClose bool) (err error) {
w.writeBatch = w.writeBatch[:0]
w.rc.reset()
w.kvBuffer.Reset()
savedBytes = w.batchSize
Copy link
Contributor Author

@D3Hunter D3Hunter Oct 17, 2023

Choose a reason for hiding this comment

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

moved to above in another pr, this can be deleted

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Oct 17, 2023
@ti-chi-bot
Copy link

ti-chi-bot bot commented Oct 17, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-10-17 02:29:03.578270612 +0000 UTC m=+1710541.165380760: ☑️ agreed by tangenta.
  • 2023-10-17 04:11:43.281921275 +0000 UTC m=+1716700.869031405: ☑️ agreed by ywqzzy.

@D3Hunter
Copy link
Contributor Author

/retest

@tiprow
Copy link

tiprow bot commented Oct 17, 2023

@D3Hunter: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@D3Hunter
Copy link
Contributor Author

/approve

@ti-chi-bot
Copy link

ti-chi-bot bot commented Oct 17, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: D3Hunter, tangenta, ywqzzy

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

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added the approved label Oct 17, 2023
@D3Hunter
Copy link
Contributor Author

/retest

@tiprow
Copy link

tiprow bot commented Oct 17, 2023

@D3Hunter: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@ti-chi-bot ti-chi-bot bot merged commit 1978479 into pingcap:master Oct 17, 2023
8 checks passed
@D3Hunter D3Hunter deleted the writer-log branch October 17, 2023 06:51
@D3Hunter
Copy link
Contributor Author

will cp to 7.5 when #47485 cp, else there might be conflict

@D3Hunter
Copy link
Contributor Author

/cherry-pick release-7.5

@ti-chi-bot
Copy link
Member

@D3Hunter: new pull request created to branch release-7.5: #47719.

In response to this:

/cherry-pick release-7.5

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants