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

br: more db pools to create databases #56867

Conversation

Leavrth
Copy link
Contributor

@Leavrth Leavrth commented Oct 28, 2024

What problem does this PR solve?

Issue Number: close #56866

Problem Summary:
Currently, BR only has 16 db pools to create databases, and it takes about more than one hour to create 200K databases.

What changed and how does it work?

Use 100 db pools to create databases, and it only takes about half an hour to finish create 200K databases.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • 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

Signed-off-by: Jianjun Liao <jianjun.liao@outlook.com>
@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/needs-tests-checked size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed do-not-merge/needs-tests-checked labels Oct 28, 2024
Copy link

tiprow bot commented Oct 28, 2024

Hi @Leavrth. 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-sigs/prow repository.

@Leavrth
Copy link
Contributor Author

Leavrth commented Oct 28, 2024

/ok-to-test

@ti-chi-bot ti-chi-bot bot added the ok-to-test Indicates a PR is ready to be tested. label Oct 28, 2024
Copy link

codecov bot commented Oct 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 57.5897%. Comparing base (3c8f2f3) to head (85ead57).
Report is 40 commits behind head on master.

Additional details and impacted files
@@                Coverage Diff                @@
##             master     #56867         +/-   ##
=================================================
- Coverage   73.3393%   57.5897%   -15.7496%     
=================================================
  Files          1636       1778        +142     
  Lines        453658     640011     +186353     
=================================================
+ Hits         332710     368581      +35871     
- Misses       100561     246926     +146365     
- Partials      20387      24504       +4117     
Flag Coverage Δ
integration 38.9765% <ø> (?)
unit 73.2955% <ø> (+0.7438%) ⬆️

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

Components Coverage Δ
dumpling 52.9478% <ø> (ø)
parser ∅ <ø> (∅)
br 63.2009% <ø> (+17.2243%) ⬆️

@princejha95
Copy link

Why we are only thinking till 200K databases ? Would this number can change in future ? If yes, we again have to make similar changes, right ?

@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Oct 28, 2024
@Leavrth
Copy link
Contributor Author

Leavrth commented Oct 29, 2024

Why we are only thinking till 200K databases ? Would this number can change in future ? If yes, we again have to make similar changes, right ?

hi, @princejha95 .
During the entire database creation process, the creation speed is basically constant. Therefore, the speed of creating databases does not depend on the number of databases to be created.
The purpose of increasing db pool size is to reduce the impact of one database creation DDL latency. The time it took to create the 200K databases is just one example. Based on this PR, we can infer that

+-----------------+-----------+
| databases count | time cost |
+-----------------+-----------+
| 200 K           | 30 min    |
+-----------------+-----------+
| 400 K           | 60 min    |
+-----------------+-----------+
| 600 K           | 90 min    |
+-----------------+-----------+
...

Copy link

ti-chi-bot bot commented Oct 30, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 3pointer, YuJuncen

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 lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Oct 30, 2024
Copy link

ti-chi-bot bot commented Oct 30, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-10-28 07:40:30.276335806 +0000 UTC m=+249143.115491345: ☑️ agreed by YuJuncen.
  • 2024-10-30 06:31:51.602129359 +0000 UTC m=+417824.441284902: ☑️ agreed by 3pointer.

@Leavrth
Copy link
Contributor Author

Leavrth commented Oct 30, 2024

/retest

1 similar comment
@Leavrth
Copy link
Contributor Author

Leavrth commented Oct 30, 2024

/retest

@ti-chi-bot ti-chi-bot bot merged commit c75d36d into pingcap:master Oct 30, 2024
36 of 48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm ok-to-test Indicates a PR is ready to be tested. release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

more db pool size is needed for br to create many databases
4 participants