GaussDB T 生成WSR报告解读
华为GaussDB T WSR(Workload Statistics Report)是GaussDB T自带的系统工具,WSR通过对比两次快照收集到的统计信息,来生成报表数据,用于分析指定时间段内数据库的性能情况,用于分析系统性能问题,类比于Oracle的AWR报告。
WSR详细介绍参考:
华为GaussDB T 负载分析报告WSR https://www.modb.pro/db/7107
查看快照list:
SQL> wsr list Listing the lastest Completed Snapshots Snap Id Snap Started DB_startup_time--------------- ------------------- ------------------ 322 2019-12-26 11:12:18 2019-12-25 11:12:17 321 2019-12-26 10:42:18 2019-12-25 11:12:17 320 2019-12-26 10:12:18 2019-12-25 11:12:17 319 2019-12-26 09:42:18 2019-12-25 11:12:17 318 2019-12-26 09:12:18 2019-12-25 11:12:17 317 2019-12-26 08:42:18 2019-12-25 11:12:17 316 2019-12-26 08:12:18 2019-12-25 11:12:17 315 2019-12-26 07:42:18 2019-12-25 11:12:17 314 2019-12-26 07:12:18 2019-12-25 11:12:17 313 2019-12-26 06:42:18 2019-12-25 11:12:17 312 2019-12-26 06:12:18 2019-12-25 11:12:17 311 2019-12-26 05:42:18 2019-12-25 11:12:17 310 2019-12-26 05:12:18 2019-12-25 11:12:17 309 2019-12-26 04:42:18 2019-12-25 11:12:17 308 2019-12-26 04:12:18 2019-12-25 11:12:17 307 2019-12-26 03:42:18 2019-12-25 11:12:17 306 2019-12-26 03:12:18 2019-12-25 11:12:17 305 2019-12-26 02:42:18 2019-12-25 11:12:17 304 2019-12-26 02:12:18 2019-12-25 11:12:17 303 2019-12-26 01:42:18 2019-12-25 11:12:17
手工创建快照:
SQL> call wsr$create_snapshot; PL/SQL procedure successfully completed. SQL> SQL> wsr list Listing the lastest Completed Snapshots Snap Id Snap Started DB_startup_time--------------- ------------------- ------------------ 323 2019-12-26 11:34:56 2019-12-25 11:12:17 322 2019-12-26 11:12:18 2019-12-25 11:12:17 321 2019-12-26 10:42:18 2019-12-25 11:12:17 320 2019-12-26 10:12:18 2019-12-25 11:12:17 319 2019-12-26 09:42:18 2019-12-25 11:12:17 318 2019-12-26 09:12:18 2019-12-25 11:12:17 317 2019-12-26 08:42:18 2019-12-25 11:12:17 316 2019-12-26 08:12:18 2019-12-25 11:12:17 315 2019-12-26 07:42:18 2019-12-25 11:12:17 314 2019-12-26 07:12:18 2019-12-25 11:12:17 313 2019-12-26 06:42:18 2019-12-25 11:12:17 312 2019-12-26 06:12:18 2019-12-25 11:12:17 311 2019-12-26 05:42:18 2019-12-25 11:12:17 310 2019-12-26 05:12:18 2019-12-25 11:12:17 309 2019-12-26 04:42:18 2019-12-25 11:12:17 308 2019-12-26 04:12:18 2019-12-25 11:12:17 307 2019-12-26 03:42:18 2019-12-25 11:12:17 306 2019-12-26 03:12:18 2019-12-25 11:12:17 305 2019-12-26 02:42:18 2019-12-25 11:12:17 304 2019-12-26 02:12:18 2019-12-25 11:12:17
生成WSR报告:
SQL> wsr 322 323 WSR report file name : wsrrpt_322_323.html WSR report Generation Success.
详细操作参考:
《GaussDB T WSR简介》 : https://www.modb.pro/db/13711
另外还有两篇墨天轮文档供参考:
《深入解读GaussDB WSR性能分析报告》:https://www.modb.pro/doc/852
《GaussDB 100 WSR报告操作手册》:https://www.modb.pro/doc/851
查看报告:
可以在墨天轮上查看报告示例:
《Gaussdb T WSR 报告示例》 : https://www.modb.pro/db/13710
报告基本上就是按照Oracle AWR的模子来做的,熟悉AWR报告的同学应该非常容易上手。主要分为以下几个部分:
Database Information
Instance Information
Host Information
Snap Information
Database Load
Instance Efficiency
Top 10 Events by Total Wait Time
Host CPU
Host Memory
Instance Snap
Session Statistics
SQL Statistics
Complete List of SQL Text
Segment Statistics
Instance Parameters
GaussDB T 的dbtime为60.58,按照Oracle的计算方式来看,cpus为2,快照间隔为22分钟,60/22≈3>2,说明目前的负载对当前硬件来说已经较高,需要降低负载或者升级硬件。
Elapsed Time | DB Time |
---|---|
22.63 (mins) | 60.58 (mins) |
如下是gaussdb T的TOP 10等待事件:
转自墨天轮
- 点赞
- 收藏
- 关注作者
评论(0)