Skip to content

*: enlarge the default region-size.#17311

Merged
ti-chi-bot[bot] merged 5 commits intotikv:masterfrom
LykxSassinator:large_region_size
Aug 5, 2024
Merged

*: enlarge the default region-size.#17311
ti-chi-bot[bot] merged 5 commits intotikv:masterfrom
LykxSassinator:large_region_size

Conversation

@LykxSassinator
Copy link
Contributor

@LykxSassinator LykxSassinator commented Jul 26, 2024

What is changed and how it works?

Issue Number: ref #17309

What's Changed:

This pr make the default setting of `coprocessor.region-split-size` larger,
from `96MB` to `256MB` by default.  The new setting for `region-split-size` is
compatible to the larger cluster.

Related changes

  • PR to update pingcap/docs/pingcap/docs-cn:
  • Need to cherry-pick to the release branch

Check List

Tests

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

Side effects

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

The following charts show the positive feedbacks tested on typical workloads by larger region-size (256MB), compared with the current value (96MB):

  1. For TPCC 20k warehouses workloads (PS: As for QPS, higher is better; As for latency diff, smaller is better)
    image

  2. For OLTP workload (PS: As for QPS, higher is better. And if the percent is < 0, it means "larger region-size" might give regressions. Since the fluctuations of throughput is < +-1%, it can be regarded as bias.)
    image

Release note

Change the default region-size from 96MB to 256MB.

This pr make the default setting of `coprocessor.region-split-size` larger, from `96MB` to `256MB`
by default. The new setting for `region-split-size` is compatible to the larger cluster.

Signed-off-by: lucasliang <nkcs_lykx@hotmail.com>
@ti-chi-bot ti-chi-bot bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Indicates the PR's author has signed the dco. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jul 26, 2024
@LykxSassinator LykxSassinator changed the title *: make the default region-size larger. *: enlarge the default region-size. Jul 26, 2024
Copy link
Member

@zhangjinpeng87 zhangjinpeng87 left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Jul 26, 2024
@zhangjinpeng87
Copy link
Member

@LykxSassinator Please paste some performance comparison results here.

LykxSassinator and others added 2 commits July 30, 2024 13:54
Co-authored-by: Bisheng Huang <hbisheng@gmail.com>
Signed-off-by: lucasliang <nkcs_lykx@hotmail.com>
Signed-off-by: lucasliang <nkcs_lykx@hotmail.com>
Copy link
Member

@v01dstar v01dstar left a comment

Choose a reason for hiding this comment

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

lgtm

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Aug 2, 2024
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Aug 2, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-07-26 21:31:57.692377188 +0000 UTC m=+41401.819437343: ☑️ agreed by zhangjinpeng87.
  • 2024-08-02 16:58:45.520379523 +0000 UTC m=+25655.387478608: ☑️ agreed by v01dstar.

@zhangjinpeng87
Copy link
Member

/approve

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Aug 2, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: v01dstar, zhangjinpeng87

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

The pull request process is described here

Details 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

## When Backup region [a,e) size exceeds `sst-max-size`, it will be backuped into several Files [a,b),
## [b,c), [c,d), [d,e) and the size of [a,b), [b,c), [c,d) will be `sst-max-size` (or a
## little larger).
# sst-max-size = "144MB"
Copy link
Member

Choose a reason for hiding this comment

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

Maybe it should be changed to the default sst file size (64MB)?

Copy link
Contributor Author

@LykxSassinator LykxSassinator Aug 4, 2024

Choose a reason for hiding this comment

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

The default value of sst_max_size is equal to region_max_size by design where it's expected to make the size of region compatible to the split size when backup.

sst_max_size: default_coprocessor.region_max_size(),

Copy link
Contributor Author

Choose a reason for hiding this comment

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

/cc @YuJuncen

Copy link
Contributor

Choose a reason for hiding this comment

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

In most cases, the SST size should be equal to the region size. That is we want to align the SST's boundary with the regions' because we use the SST's boundary to split regions during restoring.

This sst_max_size is used for handing abnormal sized regions -- we generate SSTs in memory, when there are huge SSTs, OOM may happen.

I guess both increase it to 384MiB or keep it unchanged are acceptable.

Copy link
Contributor

Choose a reason for hiding this comment

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

/cc @3pointer

Copy link
Member

Choose a reason for hiding this comment

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

The region size is uncompressed data size, but the sst size is compressed data size.

Copy link
Contributor

Choose a reason for hiding this comment

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

please remember ping lightning developers when region size is changed. Some E2E failed recently.

pingcap/tidb#55374 (comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

IMO, it's better to mark this information as an relevant info to TiKV, as the developers of TiKV may not have received this information.

@LykxSassinator
Copy link
Contributor Author

/test

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Aug 5, 2024

@LykxSassinator: The /test command needs one or more targets.
The following commands are available to trigger required jobs:

  • /test pull-unit-test

Use /test all to run all jobs.

Details

In response to this:

/test

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.

@LykxSassinator
Copy link
Contributor Author

/test pull-unit-test

@ti-chi-bot ti-chi-bot bot requested a review from YuJuncen August 5, 2024 02:55
@wuhuizuo
Copy link
Contributor

wuhuizuo commented Aug 5, 2024

/retest

@ti-chi-bot ti-chi-bot bot requested a review from 3pointer August 5, 2024 04:14
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Aug 5, 2024

@LykxSassinator: Your PR was out of date, I have automatically updated it for you.

If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

Details

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.

@ti-chi-bot ti-chi-bot bot merged commit 74a760f into tikv:master Aug 5, 2024
@ti-chi-bot ti-chi-bot bot added this to the Pool milestone Aug 5, 2024
3AceShowHand pushed a commit to 3AceShowHand/tikv that referenced this pull request Aug 5, 2024
ref tikv#17309

This pr make the default setting of `coprocessor.region-split-size` larger,
from `96MB` to `256MB` by default.  The new setting for `region-split-size` is
compatible to the larger cluster.

Signed-off-by: lucasliang <nkcs_lykx@hotmail.com>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
Co-authored-by: Bisheng Huang <hbisheng@gmail.com>
Signed-off-by: 3AceShowHand <jinl1037@hotmail.com>
LykxSassinator added a commit to LykxSassinator/tikv that referenced this pull request Aug 16, 2024
LykxSassinator added a commit to LykxSassinator/tikv that referenced this pull request Aug 16, 2024
This reverts commit 74a760f.

Signed-off-by: lucasliang <nkcs_lykx@hotmail.com>
ti-chi-bot bot added a commit that referenced this pull request Aug 16, 2024
ref pingcap/tidb#55374

Revert the changes on the configuration of region-size. These changes will be delayed until v8.4

Signed-off-by: lucasliang <nkcs_lykx@hotmail.com>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
LykxSassinator added a commit to LykxSassinator/tikv that referenced this pull request Oct 15, 2024
This reverts commit 74a760f.

Signed-off-by: lucasliang <nkcs_lykx@hotmail.com>
hhwyt pushed a commit to hhwyt/tikv that referenced this pull request Dec 5, 2024
ref tikv#17309

This pr make the default setting of `coprocessor.region-split-size` larger,
from `96MB` to `256MB` by default.  The new setting for `region-split-size` is
compatible to the larger cluster.

Signed-off-by: lucasliang <nkcs_lykx@hotmail.com>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
Co-authored-by: Bisheng Huang <hbisheng@gmail.com>
(cherry picked from commit 74a760f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved dco-signoff: yes Indicates the PR's author has signed the dco. lgtm release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants