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

add doc for schema cache #18646

Merged
merged 22 commits into from
Oct 15, 2024
Merged

Conversation

wjhuang2016
Copy link
Member

@wjhuang2016 wjhuang2016 commented Sep 14, 2024

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 (in Chinese).

  • master (the latest development version)
  • v8.4 (TiDB 8.4 versions)
  • v8.3 (TiDB 8.3 versions)
  • v8.2 (TiDB 8.2 versions)
  • v8.1 (TiDB 8.1 versions)
  • v7.5 (TiDB 7.5 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)

What is the related PR or file 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

Signed-off-by: wjhuang2016 <[email protected]>
@ti-chi-bot ti-chi-bot bot added missing-translation-status This PR does not have translation status info. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Sep 14, 2024
schema-cache.md Outdated Show resolved Hide resolved
schema-cache.md Outdated Show resolved Hide resolved
schema-cache.md Show resolved Hide resolved
schema-cache.md Outdated Show resolved Hide resolved
schema-cache.md Outdated Show resolved Hide resolved
@Oreoxmt Oreoxmt added translation/doing This PR’s assignee is translating this PR. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. v8.4 This PR/issue applies to TiDB v8.4. labels Sep 18, 2024
@ti-chi-bot ti-chi-bot bot removed the missing-translation-status This PR does not have translation status info. label Sep 18, 2024
@Oreoxmt Oreoxmt requested a review from hfxsd September 18, 2024 06:27
Signed-off-by: wjhuang2016 <[email protected]>
Signed-off-by: wjhuang2016 <[email protected]>
schema-cache.md Outdated Show resolved Hide resolved
Signed-off-by: wjhuang2016 <[email protected]>
@ti-chi-bot ti-chi-bot bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Sep 23, 2024
schema-cache.md Outdated Show resolved Hide resolved
schema-cache.md Outdated
Comment on lines 18 to 19
- 可以通过观测 TiDB 监控中 Schema load 下的子面板 Infoschema v2 Cache Operation 来查看 schema 缓存的命中率。如果命中率较低,可以调大 [`tidb_schema_cache_size`](/system-variables.md#tidb_schema_cache_size-从-v800-版本开始引入)。
- 可以通过观测 TiDB 监控中 Schema load 下的子面板 Infoschema v2 Cache Size 来查看当前使用的 schema 缓存的大小。
Copy link
Contributor

Choose a reason for hiding this comment

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

要不要贴个截图

Copy link
Member Author

Choose a reason for hiding this comment

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

感觉不需要,用户如果熟悉监控的话也能找到

@hfxsd hfxsd requested a review from lilin90 September 24, 2024 03:01
schema-cache.md Show resolved Hide resolved
schema-cache.md Outdated Show resolved Hide resolved
schema-cache.md Outdated Show resolved Hide resolved
wjhuang2016 and others added 3 commits September 24, 2024 14:13
Co-authored-by: xixirangrang <[email protected]>
Co-authored-by: xixirangrang <[email protected]>
Co-authored-by: xixirangrang <[email protected]>
schema-cache.md Outdated
- 可以通过观测 TiDB 监控中 Schema load 下的子面板 Infoschema v2 Cache Operation 来查看 schema 缓存的命中率。如果命中率较低,可以调大 [`tidb_schema_cache_size`](/system-variables.md#tidb_schema_cache_size-从-v800-版本开始引入)。
- 可以通过观测 TiDB 监控中 Schema load 下的子面板 Infoschema v2 Cache Size 来查看当前使用的 schema 缓存的大小。
- 建议关闭 [`performance.force-init-stats`](/tidb-configuration-file.md#force-init-stats-从-v657-和-v710-版本开始引入) 以减少 TiDB 的启动时间。
- 建议关闭 [`split-table`](/tidb-configuration-file.md#split-table) 以减少 region 数量,从而降低 TiKV 的内存。
Copy link
Collaborator

Choose a reason for hiding this comment

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

建议加上场景“如果需要创建大量的表(例如 10 万张以上),建议将此参数设置为 false”

Copy link
Member Author

Choose a reason for hiding this comment

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

你用建议模式改下?

schema-cache.md Show resolved Hide resolved
schema-cache.md Outdated Show resolved Hide resolved
schema-cache.md Outdated Show resolved Hide resolved
schema-cache.md Outdated Show resolved Hide resolved
schema-cache.md Show resolved Hide resolved
Copy link

ti-chi-bot bot commented Sep 26, 2024

@Benjamin2037: adding LGTM is restricted to approvers and reviewers in OWNERS files.

In response to this:

LGTM

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.

@dveeden
Copy link
Contributor

dveeden commented Sep 26, 2024

/verify

@purelind
Copy link

/retest

@hfxsd hfxsd added translation/done This PR has been translated from English into Chinese and updated to pingcap/docs-cn in a PR. and removed translation/doing This PR’s assignee is translating this PR. labels Sep 26, 2024
schema-cache.md Outdated Show resolved Hide resolved
schema-cache.md Outdated Show resolved Hide resolved
schema-cache.md Outdated Show resolved Hide resolved
TOC.md Outdated Show resolved Hide resolved
schema-cache.md Outdated Show resolved Hide resolved
schema-cache.md Outdated Show resolved Hide resolved
schema-cache.md Outdated Show resolved Hide resolved
schema-cache.md Outdated Show resolved Hide resolved
schema-cache.md Outdated Show resolved Hide resolved
schema-cache.md Outdated Show resolved Hide resolved
Copy link
Member

@lilin90 lilin90 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 the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Oct 14, 2024
Copy link

ti-chi-bot bot commented Oct 14, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-10-14 08:18:53.197390823 +0000 UTC m=+259130.346300651: ☑️ agreed by lilin90.

@hfxsd hfxsd added lgtm and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Oct 15, 2024
@hfxsd
Copy link
Collaborator

hfxsd commented Oct 15, 2024

/approve

Copy link

ti-chi-bot bot commented Oct 15, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hfxsd

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 15, 2024
@ti-chi-bot ti-chi-bot bot merged commit e50e2d2 into pingcap:master Oct 15, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm needs-1-more-lgtm Indicates a PR needs 1 more LGTM. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. translation/done This PR has been translated from English into Chinese and updated to pingcap/docs-cn in a PR. v8.4 This PR/issue applies to TiDB v8.4.
Projects
None yet
Development

Successfully merging this pull request may close these issues.