-
Notifications
You must be signed in to change notification settings - Fork 1.2k
doc: complementary to desc of in-mem-slow-query-topn-num
and and in-mem-slow-query-recent-num
.
#20521
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
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: AilinKid <[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 |
in-mem-slow-query-topn-num
and and
in-mem-slow-query-recent-num`.in-mem-slow-query-topn-num
and and in-mem-slow-query-recent-num
.
@AilinKid Could you please invite a tech reviewer? Thanks! |
@hawkingrei: adding LGTM is restricted to approvers and reviewers in OWNERS files. In response to this: 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. |
> **内存查询优先**: 当查询 `INFORMATION_SCHEMA.SLOW_QUERY` 表时候,TiDB 首先检查内存堆上缓存的慢查询,不行然后再去解析节点上的慢查询日志文件,`in-mem-slow-query-topn-num` 提供了指向内存堆中最慢的 N 个慢查询的堆内存缓存数量,该内存堆可以用来提供最慢慢查询的快速内存访问,从而避免解析日志文件。 | ||
|
||
> **内存消耗**: 该参数用于在快速检索最慢 N 个特征性慢查询的能力与慢查询堆内存占用控制之间实现平衡。设置的太高会导致内存堆在收集慢查询上消耗过多内存,设置太小可能会导致无法提供足够有效的最慢历史慢查询上下文,从而导致需要解析全量的日志文件来获取完整的慢查询信息。 | ||
|
||
+ 每个 tidb 实例缓存在内存堆中的最慢的 slow query 个数。 |
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.
> **内存查询优先**: 当查询 `INFORMATION_SCHEMA.SLOW_QUERY` 表时候,TiDB 首先检查内存堆上缓存的慢查询,不行然后再去解析节点上的慢查询日志文件,`in-mem-slow-query-topn-num` 提供了指向内存堆中最慢的 N 个慢查询的堆内存缓存数量,该内存堆可以用来提供最慢慢查询的快速内存访问,从而避免解析日志文件。 | |
> **内存消耗**: 该参数用于在快速检索最慢 N 个特征性慢查询的能力与慢查询堆内存占用控制之间实现平衡。设置的太高会导致内存堆在收集慢查询上消耗过多内存,设置太小可能会导致无法提供足够有效的最慢历史慢查询上下文,从而导致需要解析全量的日志文件来获取完整的慢查询信息。 | |
+ 每个 tidb 实例缓存在内存堆中的最慢的 slow query 个数。 | |
+ 用于设置每个 TiDB 实例在内存中缓存的最慢的慢查询数量,以提升访问慢查询时的查询性能。具体功能如下: | |
+ **优化查询流程**:查询 `INFORMATION_SCHEMA.SLOW_QUERY` 表时,TiDB 会优先从内存中读取缓存的慢查询记录。只有在缓存未命中时,TiDB 才会解析本地慢查询日志文件。通过设置 `in-mem-slow-query-topn-num`,你可以指定最多在内存中缓存多少条最慢的慢查询,从而加快访问最慢慢查询的速度并减少日志文件解析的开销。 | |
+ **平衡内存使用**:该配置项有助于在提升最慢 N 个慢查询检索效率与控制内存占用之间实现平衡。值设置过高可能导致慢查询缓存占用过多内存,值设置过低则可能因缓存不足而频繁解析日志文件,从而需要解析全量的日志文件以获取完整的慢查询记录。 | |
> **内存查询优先**: 当查询 `INFORMATION_SCHEMA.SLOW_QUERY` 表时候,TiDB 首先检查内存堆上缓存的慢查询,不行然后再去解析节点上的慢查询日志文件,`in-mem-slow-query-recent-num` 提供了指向内存堆中最近的 N 个慢查询的堆内存缓存数量,该内存堆可以用来提供最近慢查询的快速内存访问,从而避免解析日志文件。 | ||
|
||
> **内存消耗**: 该参数用于在快速检索最近 N 个特征性慢查询的能力与慢查询堆内存占用控制之间实现平衡。设置的太高会导致内存堆在收集慢查询上消耗过多内存,设置太小可能会导致无法提供足够有效的最近历史慢查询上下文,从而导致需要解析全量的日志文件来获取完整的慢查询信息。 | ||
|
||
+ 每个 tidb 实例缓存在内存堆中的最近使用的 slow query 个数。 |
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.
> **内存查询优先**: 当查询 `INFORMATION_SCHEMA.SLOW_QUERY` 表时候,TiDB 首先检查内存堆上缓存的慢查询,不行然后再去解析节点上的慢查询日志文件,`in-mem-slow-query-recent-num` 提供了指向内存堆中最近的 N 个慢查询的堆内存缓存数量,该内存堆可以用来提供最近慢查询的快速内存访问,从而避免解析日志文件。 | |
> **内存消耗**: 该参数用于在快速检索最近 N 个特征性慢查询的能力与慢查询堆内存占用控制之间实现平衡。设置的太高会导致内存堆在收集慢查询上消耗过多内存,设置太小可能会导致无法提供足够有效的最近历史慢查询上下文,从而导致需要解析全量的日志文件来获取完整的慢查询信息。 | |
+ 每个 tidb 实例缓存在内存堆中的最近使用的 slow query 个数。 | |
+ 用于设置每个 TiDB 实例在内存中缓存的最近使用的慢查询数量,以支持快速访问最近发生的慢查询记录。具体功能如下: | |
+ **优化查询流程**:查询 `INFORMATION_SCHEMA.SLOW_QUERY` 表时,TiDB 会优先从内存中读取缓存的慢查询记录。如果缓存中没有匹配项,TiDB 会解析本地慢查询日志文件。通过设置 `in-mem-slow-query-recent-num`,你可以指定最多在内存中保留多少条最近的慢查询,以提升查询响应速度。 | |
+ **平衡内存使用**:该配置项有助于在提升最近 N 个慢查询检索效率与控制内存占用之间实现平衡。值设置过高可能导致内存占用过多,从而影响系统整体性能。值设置过低则可能导致上下文信息不足,从而需要解析全量的日志文件以获取完整的慢查询记录。 | |
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).
What is the related PR or file link(s)?
Do your changes match any of the following descriptions?