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

Performance Tuning Guide #9067

Merged
merged 47 commits into from
May 11, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
534c639
initial commit for the performance overview
dbsid Apr 17, 2022
3ff134f
finish the db time and qps part
dbsid Apr 17, 2022
6049428
add duration metrics intro
dbsid Apr 18, 2022
f7f8fd5
add tikv write documents
dbsid Apr 19, 2022
2d0f469
finish the drat version
dbsid Apr 19, 2022
b06aa1f
minor enhancements
dbsid Apr 19, 2022
881d006
review and improvements
dbsid Apr 19, 2022
e6ec90f
split into overview and guideline
dbsid Apr 21, 2022
c7d9882
change filename from guideline to guide
dbsid Apr 21, 2022
1ad2c36
add "tuning by color" method
dbsid Apr 22, 2022
93d8e5a
improve overview
dbsid Apr 22, 2022
32ad89d
minor enhancements
dbsid Apr 22, 2022
5fb2aa9
improvements
dbsid Apr 23, 2022
0df2f85
add doc for performance overview dashboard
dbsid Apr 24, 2022
53ba122
Add TOC entry
dbsid Apr 24, 2022
6c528dc
enhance the dashboard descriptions
dbsid Apr 25, 2022
97557ef
Apply suggestions from code review
qiancai Apr 27, 2022
f38e30d
update_content_from_writing_perspective
qiancai Apr 28, 2022
c9781f4
Update grafana-performance-overview-dashboard.md
qiancai Apr 28, 2022
2f9269e
fix broken links
qiancai Apr 28, 2022
f8c708d
Update grafana-performance-overview-dashboard.md
qiancai Apr 28, 2022
df79a41
update punctuation
qiancai Apr 28, 2022
e314a86
Update performance-tuning-methods.md
dbsid Apr 28, 2022
dbdb072
Merge branch 'performance-overview' of github.com:pingcap/docs-cn int…
dbsid Apr 28, 2022
5987339
Update performance-tuning-methods.md
dbsid Apr 28, 2022
19808d7
Update performance-tuning-methods.md
dbsid Apr 28, 2022
75808aa
Update performance-tuning-methods.md
dbsid Apr 28, 2022
4132a68
Update performance-tuning-methods.md
dbsid Apr 28, 2022
990814a
add example 4 for db time overview
dbsid Apr 29, 2022
badabea
Update performance-tuning-methods.md
dbsid Apr 29, 2022
1eb9f0f
Update performance-tuning-methods.md
dbsid Apr 29, 2022
2190ca6
fix CI error
qiancai Apr 29, 2022
683a48b
fix the wrong image for prepared_statement_no_plan_cache
dbsid May 5, 2022
8899911
update performance-tuning-overview.md
Yui-Song May 5, 2022
96b01da
update grafana-performance-overview-dashboard.md
Yui-Song May 5, 2022
0aec069
update performance-tuning-methods.md
Yui-Song May 5, 2022
d6c10a6
Update performance-tuning-methods.md
Yui-Song May 6, 2022
3e0ea40
fix link error
Yui-Song May 6, 2022
a91db20
Revert "fix link error"
Yui-Song May 6, 2022
aa2047d
update dashboard-diagnostics-time-relation.png
Yui-Song May 10, 2022
2e793e5
update color description for db time by sql type, add description for…
dbsid May 10, 2022
84d2aa4
fix link
Yui-Song May 10, 2022
d2d985b
Merge branch 'performance-overview' of https://github.com/pingcap/doc…
Yui-Song May 10, 2022
c025643
correct the picture due the color change of commit
dbsid May 10, 2022
8759a4b
Update performance-tuning-methods.md
dbsid May 11, 2022
a602967
minor wording updates
qiancai May 11, 2022
44bae50
fix a broken link and make some minor wording changes
qiancai May 11, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix broken links
  • Loading branch information
qiancai committed Apr 28, 2022
commit 2f9269ea39328ab6ac30db951671ba1959a1a3fd
2 changes: 1 addition & 1 deletion grafana-performance-overview-dashboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Performance Overview Dashboard 按总分结构对 TiDB、TiKV、PD 的性能指
- 资源负载:关键指标和资源利用率,包含数据库 QPS、应用和数据库的连接信息和请求命令类型、数据库内部 TSO 和 KV 请求 OPS、TiDB 和 TiKV 的资源使用概况。
- 自上而下的延迟分解:Query 延迟和连接空闲时间对比、Query 延迟分解、execute 阶段 TSO 请求和 KV 请求的延迟、TiKV 内部写延迟的分解等。

借助 Performance Overview Dashboard,你可以高效地进行性能分析,确认用户响应时间的瓶颈是否在数据库中。如果数据库是整个系统的瓶颈,通过数据库时间概览和 SQL 延迟的分解,定位数据库内部的瓶颈点,并进行针对性的优化。详情请参考 [TiDB 性能分析和优化方法](/performance/performance-tuning-guide.md)。
借助 Performance Overview Dashboard,你可以高效地进行性能分析,确认用户响应时间的瓶颈是否在数据库中。如果数据库是整个系统的瓶颈,通过数据库时间概览和 SQL 延迟的分解,定位数据库内部的瓶颈点,并进行针对性的优化。详情请参考 [TiDB 性能分析和优化方法](performance-tuning-methods.md)。

以下为 Performance Overview Dashboard 监控说明:

Expand Down
2 changes: 1 addition & 1 deletion performance-tuning-methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ Duration 面板包含了所有语句的 99 延迟和每种 SQL 类型的平均

#### Parse、Compile 和 Execute Duration

在 TiDB 中,从输入查询文本到返回结果的[`典型处理流程`](/sql-optimization-concepts.md)。
在 TiDB 中,从输入查询文本到返回结果的[典型处理流程](/sql-optimization-concepts.md)。

SQL 在 TiDB 内部的处理分为四个阶段,get token、parse、compile 和 execute:

Expand Down
2 changes: 1 addition & 1 deletion performance-tuning-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ User Response time = Service time + Queuing delay + Coherency delay
- 如果瓶颈不在数据库中,需要借助数据库外部搜集的资源利用率,或者对应用程序进行 Profile,以确定数据库外部的瓶颈。常见场景包括应用程序或者代理服务器资源不足,应用程序存在串行点无法充分利用硬件资源等。
- 如果瓶颈存在数据库中,你可以通过数据库完善的调优工具进行数据库内部性能分析和诊断。常见场景包括存在慢 SQL、应用程序使用数据库的方式不合理、数据库存在读写热点等。

具体的分析诊断方法和工具,请参考[性能优化方法](/performance/performance-tuning-methods.md)。
具体的分析诊断方法和工具,请参考[性能优化方法](/performance-tuning-methods.md)。

### 步骤 4:提出优化方案,评估每种方案的收益、风险和成本

Expand Down