Skip to content

Conversation

@reafans
Copy link
Contributor

@reafans reafans commented Apr 15, 2020

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)

  • master (the latest development version)
  • v4.0 (TiDB 4.0 versions)
  • v3.1 (TiDB 3.1 versions)
  • v3.0 (TiDB 3.0 versions)
  • v2.1 (TiDB 2.1 versions)

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)?

@reafans reafans added translation/done This PR has been translated from English into Chinese and updated to pingcap/docs-cn in a PR. type/bugfix This PR fixes a bug. needs-cherry-pick-4.0 labels Apr 15, 2020
@reafans reafans requested a review from TomShawn April 15, 2020 07:24
Copy link
Contributor

@TomShawn TomShawn left a 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

@TomShawn TomShawn self-assigned this Apr 15, 2020
@TomShawn TomShawn added translation/doing This PR’s assignee is translating this PR. and removed translation/done This PR has been translated from English into Chinese and updated to pingcap/docs-cn in a PR. labels Apr 15, 2020
@TomShawn
Copy link
Contributor

Please update this PR according this comment.

| 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 |
Copy link
Contributor

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?

Copy link
Contributor Author

@reafans reafans Apr 23, 2020

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.

reafans and others added 2 commits April 23, 2020 16:01
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 |
Copy link
Contributor

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 的查询耗时,单位是秒。
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* `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` 系统表一致。
Copy link
Contributor

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 才能获取这些配置信息。
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

@TomShawn TomShawn added the status/require-change Needs the author to address comments. label Apr 27, 2020
Copy link
Contributor

@TomShawn TomShawn left a 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

@TomShawn TomShawn added status/PTAL This PR is ready for reviewing. and removed status/require-change Needs the author to address comments. labels Apr 28, 2020
Copy link
Contributor

@crazycs520 crazycs520 left a comment

Choose a reason for hiding this comment

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

LGTM

@reafans reafans merged commit 3b429fc into pingcap:master Apr 29, 2020
@reafans reafans deleted the refine_sql_diagnosis branch April 29, 2020 06:52
sre-bot pushed a commit to sre-bot/docs-cn that referenced this pull request Apr 29, 2020
* 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>
@sre-bot
Copy link
Contributor

sre-bot commented Apr 29, 2020

cherry pick to release-4.0 in PR #2923

@TomShawn TomShawn changed the title reference: refine sql diagnosis. reference: refine sql diagnosis Apr 29, 2020
TomShawn added a commit that referenced this pull request Apr 29, 2020
* 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>
@TomShawn TomShawn 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 Apr 29, 2020
rleungx pushed a commit to rleungx/docs-cn that referenced this pull request May 22, 2020
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status/PTAL This PR is ready for reviewing. translation/done This PR has been translated from English into Chinese and updated to pingcap/docs-cn in a PR. type/bugfix This PR fixes a bug.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants