-
Notifications
You must be signed in to change notification settings - Fork 688
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
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: tonyxuqqi <[email protected]>
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
cc @SpadeA-Tang |
> | ||
> 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
> **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. |
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. |
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. |
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. |
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.
What is the related PR or file link(s)?
Do your changes match any of the following descriptions?