-
Notifications
You must be signed in to change notification settings - Fork 1.2k
reference: refine sql diagnosis #2756
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
Conversation
…ne_sql_diagnosis
TomShawn
left a comment
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.
LGTM
@lonng @crazycs520 PTAL
|
Please update this PR according this comment. |
…ne_sql_diagnosis
…s-cn into refine_sql_diagnosis
| | tidb | 127.0.0.1:10080 | cpu | cpu | cpu-logical-cores | 8 | | ||
| | tidb | 127.0.0.1:10080 | cpu | cpu | cpu-physical-cores | 4 | | ||
| | pd | 127.0.0.1:2379 | cpu | cpu | cpu-logical-cores | 8 | | ||
| | tidb | 0.0.0.0:4000 | cpu | cpu | cpu-logical-cores | 4 | |
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.
Both cpu-logical-cores and cpu-physical-cores is 4?
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.
I run it in the Virtual Machine of the Virtual Box,so it shows that both of them are same. To avoid misunderstand, i changed it back to 8.
Co-Authored-By: crazycs <crazycs520@gmail.com>
Co-Authored-By: crazycs <crazycs520@gmail.com>
Co-Authored-By: TomShawn <41534398+TomShawn@users.noreply.github.com>
| | TiKV | leader-score-balance | pd_scheduler_store_status | 小于 0.05 | 检测各个 TiKV 节点的 leader score 是否均衡,期望节点间的差异小于 5% | | ||
| | TiKV | region-score-balance | pd_scheduler_store_status | 小于 0.05 | 检测各个 TiKV 节点的 Region score 是否均衡,期望节点间的差异小于 5% | | ||
| | TiKV | store-available-balance | pd_scheduler_store_status | 小于 0.2 | 检测各个 TiKV 节点的存储可用空间大小是否均衡,期望节点间的差异小于 20% | | ||
| | TiKV | region-count | pd_scheduler_store_status | 小于 20000 | 检测各个 TiKV 节点的 Region 数量,期望单个节点的 Region 数量小于 20000 | |
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.
@reafans 请再确认 SQL 诊断相关系统表文档中的 节点 是否应该替换成 实例。
| * `QUANTILE`:百分位。对于直方图类型的监控数据,指定一个默认百分位。如果值为 `0`,表示该监控表对应的监控不是直方图。`tidb_query_duration` 默认查询 0.9 ,也就是 P90 的监控值。 | ||
| * `COMMENT`:对这个监控表的解释。可以看出 `tidb_query_duration` 表的是用来查询 TiDB query 执行的百分位时间,如 P999/P99/P90 的查询耗时,单位是秒。 | ||
| * `QUANTILE`:百分位。直方图类型的监控数据会指定一个默认百分位。如果值为 `0`,表示该监控表对应的监控不是直方图。`tidb_query_duration` 默认查询 0.9 ,也就是 P90 的监控值。 | ||
| * `COMMENT`:对这个监控表的解释。可以看出 `tidb_query_duration` 表是用来查询 TiDB query 执行的百分位时间的,如 P999/P99/P90 的查询耗时,单位是秒。 |
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.
| * `COMMENT`:对这个监控表的解释。可以看出 `tidb_query_duration` 表是用来查询 TiDB query 执行的百分位时间的,如 P999/P99/P90 的查询耗时,单位是秒。 | |
| * `COMMENT`:对这个监控表的解释。可以看出 `tidb_query_duration` 表是用来查询 TiDB query 执行的百分位时间,如 P999/P99/P90 的查询耗时,单位是秒。 |
| * 集群日志表 [`information_schema.cluster_log`](/reference/system-databases/cluster-log.md) 用于集群日志查询,通过将查询条件下推到各个实例,降低日志查询对集群的影响,性能影响小于等 grep 命令。 | ||
|
|
||
| TiDB 4.0 之前的系统表,只能查看当前节点,TiDB 4.0 实现了对应的集群表,可以在单个 TiDB 节点上拥有整个集群的全局视图。这些表目前都位于 [`information_schema`](/reference/system-databases/information-schema.md) 中,查询方式与其他 `information_schema` 系统表一致。 | ||
| TiDB 4.0 之前的系统表,只能查看当前节点信息,TiDB 4.0 实现了对应的集群表,可以在单个 TiDB 实例上拥有整个集群的全局视图。这些表目前都位于 [`information_schema`](/reference/system-databases/information-schema.md) 中,查询方式与其他 `information_schema` 系统表一致。 |
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.cluster_info`](/reference/system-databases/cluster-info.md) 用于获取集群当前的拓扑信息,以及各个节点的版本、版本对应的 Git Hash、各节点的启动时间、各节点的运行时间。 | ||
| * 集群配置表 [`information_schema.cluster_config`](/reference/system-databases/cluster-config.md) 用于获取集群当前所有节点的配置。对于 TiDB 4.0 之前的版本,用户必须逐个访问各个节点的 HTTP API 才能获取这些配置信息。 | ||
| * 集群拓扑表 [`information_schema.cluster_info`](/reference/system-databases/cluster-info.md) 用于获取集群当前的拓扑信息,以及各个实例的版本、版本对应的 Git Hash、各实例的启动时间、各实例的运行时间。 | ||
| * 集群配置表 [`information_schema.cluster_config`](/reference/system-databases/cluster-config.md) 用于获取集群当前所有实例的配置。对于 TiDB 4.0 之前的版本,用户必须逐个访问各个节点中实例的 HTTP API 才能获取这些配置信息。 |
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.
ditto
…ne_sql_diagnosis
…s-cn into refine_sql_diagnosis
TomShawn
left a comment
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.
LGTM
@crazycs520 PTAL again
crazycs520
left a comment
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.
LGTM
* refine sql diagnosis * refine * refine * refine doc * refine * refine * Update reference/system-databases/inspection-result.md Co-Authored-By: crazycs <crazycs520@gmail.com> * Update reference/system-databases/metrics-schema.md Co-Authored-By: crazycs <crazycs520@gmail.com> * Update reference/system-databases/inspection-summary.md Co-Authored-By: TomShawn <41534398+TomShawn@users.noreply.github.com> * address comment Co-authored-by: crazycs <crazycs520@gmail.com> Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com>
|
cherry pick to release-4.0 in PR #2923 |
* refine sql diagnosis * refine * refine * refine doc * refine * refine * Update reference/system-databases/inspection-result.md Co-Authored-By: crazycs <crazycs520@gmail.com> * Update reference/system-databases/metrics-schema.md Co-Authored-By: crazycs <crazycs520@gmail.com> * Update reference/system-databases/inspection-summary.md Co-Authored-By: TomShawn <41534398+TomShawn@users.noreply.github.com> * address comment Co-authored-by: crazycs <crazycs520@gmail.com> Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com> Co-authored-by: reafans <30926443+reafans@users.noreply.github.com> Co-authored-by: crazycs <crazycs520@gmail.com> Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com>
* refine sql diagnosis * refine * refine * refine doc * refine * refine * Update reference/system-databases/inspection-result.md Co-Authored-By: crazycs <crazycs520@gmail.com> * Update reference/system-databases/metrics-schema.md Co-Authored-By: crazycs <crazycs520@gmail.com> * Update reference/system-databases/inspection-summary.md Co-Authored-By: TomShawn <41534398+TomShawn@users.noreply.github.com> * address comment Co-authored-by: crazycs <crazycs520@gmail.com> Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com>
What is changed, added or deleted? (Required)
Fix some changed place in SQL diagnosis-related system table documents.
Which TiDB version(s) do your changes apply to? (Required)
If you select two or more versions from above, to trigger the bot to cherry-pick this PR to your desired release version branch(es), you must add corresponding labels such as needs-cherry-pick-4.0, needs-cherry-pick-3.1, needs-cherry-pick-3.0, and needs-cherry-pick-2.1.
What is the related PR or file link(s)?