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

polish compaction filter configuration doc #16179

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tonyxuqqi
Copy link
Contributor

First-time contributors' checklist

What is changed, added or deleted? (Required)

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

Tips for choosing the affected version(s):

By default, CHOOSE MASTER ONLY so your changes will be applied to the next TiDB major or minor releases. If your PR involves a product feature behavior change or a compatibility change, CHOOSE THE AFFECTED RELEASE BRANCH(ES) AND MASTER.

For details, see tips for choosing the affected versions.

  • master (the latest development version)
  • v7.6 (TiDB 7.6 versions)
  • v7.5 (TiDB 7.5 versions)
  • v7.4 (TiDB 7.4 versions)
  • v7.3 (TiDB 7.3 versions)
  • v7.1 (TiDB 7.1 versions)
  • v6.5 (TiDB 6.5 versions)
  • v6.1 (TiDB 6.1 versions)
  • v5.4 (TiDB 5.4 versions)
  • v5.3 (TiDB 5.3 versions)
  • v5.2 (TiDB 5.2 versions)
  • v5.1 (TiDB 5.1 versions)
  • v5.0 (TiDB 5.0 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

Copy link

ti-chi-bot bot commented Jan 16, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign qiancai for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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 missing-translation-status This PR does not have translation status info. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jan 16, 2024
@tonyxuqqi
Copy link
Contributor Author

cc @SpadeA-Tang

@Oreoxmt Oreoxmt added translation/from-docs-cn This PR is translated from a PR in pingcap/docs-cn. needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. needs-cherry-pick-release-7.3 needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. labels Jan 22, 2024
@ti-chi-bot ti-chi-bot bot removed the missing-translation-status This PR does not have translation status info. label Jan 22, 2024
Comment on lines +112 to +114
>
> The compaction filter may delay the entries to be deleted in some cases, which could lead to performance regression in TiKV scan. And if `next` or `prev` in [`Coprocessor Details->Total Ops Details`](/grafana-tikv-dashboard.md###Coprocessor-Detail) are far more (3x+) than `processed_keys`, then it's recommended to disable compaction filter to speed up the GC. In TiDB 7.1.3 or newer version, TiDB would check each region's redundent version count[`region-compact-min-redundant-rows`](/tikv-configuration-file.md###region-compact-min-redundant-rows) and ratio[`region-compact-redundant-rows-percent`](/tikv-configuration-file.md###region-compact-redundant-rows-percent) to automatic trigger compaction, which would greatly mitigate the issue. And therefore in TiDB 7.1.3 or newer version, it's recommended to tune these parameters instead of disabling compaction filter.
Copy link
Collaborator

@Oreoxmt Oreoxmt Jan 22, 2024

Choose a reason for hiding this comment

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

Suggested change
> **Note:**
>
> The compaction filter may delay the entries to be deleted in some cases, which could lead to performance regression in TiKV scan. And if `next` or `prev` in [`Coprocessor Details->Total Ops Details`](/grafana-tikv-dashboard.md###Coprocessor-Detail) are far more (3x+) than `processed_keys`, then it's recommended to disable compaction filter to speed up the GC. In TiDB 7.1.3 or newer version, TiDB would check each region's redundent version count[`region-compact-min-redundant-rows`](/tikv-configuration-file.md###region-compact-min-redundant-rows) and ratio[`region-compact-redundant-rows-percent`](/tikv-configuration-file.md###region-compact-redundant-rows-percent) to automatic trigger compaction, which would greatly mitigate the issue. And therefore in TiDB 7.1.3 or newer version, it's recommended to tune these parameters instead of disabling compaction filter.
> **Note:**
>
> When using the mechanism of GC in Compaction Filter, the GC progress might be delayed, which leads to the performance regression of TiKV scan. If your workload contains a large number of coprocessor requests, and you observe that the number of `next()` or `prev()` calls of Total Ops Details in the [**TiKV-Details > Coprocessor Detail**](/grafana-tikv-dashboard.md#coprocessor-detail) panel is three times more than the number of `processed_keys` calls, consider the following actions:
> - For TiDB v7.1.3 earlier versions, it is recommended to try disabling Compaction Filter to speed up GC.
> - Starting from v7.1.3, to speed up GC in Compaction Filter, TiDB automatically triggers compaction based on the redundant version number [`region-compact-min-redundant-rows`](/tikv-configuration-file.md#region-compact-min-redundant-rows) and ratio [`region-compact-redundant-rows-percent`](/tikv-configuration-file.md#region-compact-redundant-rows-percent) of each Region. For TiDB v7.1.3 and later versions, if you encounter the preceding situation, it is recommended to adjust these two parameters instead of disabling Compaction Filter.

@qiancai
Copy link
Collaborator

qiancai commented Feb 2, 2024

Removed the needs-cherry-pick-release-7.3 label because the v7.3 docs have been archived at https://docs-archive.pingcap.com/tidb/v7.3 and will no longer receive new updates.

@qiancai
Copy link
Collaborator

qiancai commented Apr 15, 2024

Removed the needs-cherry-pick-release-7.4 label because the v7.4 docs have been archived at https://docs-archive.pingcap.com/tidb/v7.4 and will no longer receive new updates.

@qiancai
Copy link
Collaborator

qiancai commented Jul 19, 2024

Removed the needs-cherry-pick-release-7.6 label because the v7.6 docs have been archived at https://docs-archive.pingcap.com/tidb/v7.6 and will no longer receive new updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. translation/from-docs-cn This PR is translated from a PR in pingcap/docs-cn.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants