openGauss学习笔记-136 openGauss 数据库运维-例行维护-检查数据库性能

136.1 检查办法

通过openGauss提供的性能统计工具gs_checkperf可以对硬件性能进行检查。

前提条件

  • openGauss运行状态正常。
  • 运行在数据库之上的业务运行正常。

操作步骤

  1. 以操作系统用户omm登录数据库主节点。

  2. 执行如下命令对openGauss数据库进行性能检查。

    gs_checkperf
    

具体的性能统计项目请参见《工具与命令参考》中“服务端工具 > gs_checkperf > 性能检查项”。

示例

以简要格式在屏幕上显示性能统计结果。

gs_checkperf -i pmk -U omm
Cluster statistics information:
    Host CPU busy time ratio                     :    1.43       %
    MPPDB CPU time % in busy time                :    1.88       %
    Shared Buffer Hit ratio                      :    99.96      %
    In-memory sort ratio                         :    100.00     %
    Physical Reads                               :    4
    Physical Writes                              :    25
    DB size                                      :    70         MB
    Total Physical writes                        :    25
    Active SQL count                             :    2
    Session count                                :    3

136.2 异常处理

使用gs_checkperf工具检查openGauss性能状态后,如果发现检查结果发现异常,可以根据以下内容进行修复。

表 2 检查openGauss级别性能状态

表 3 检查节点级别性能状态

表 4 会话/进程级别性能状态

表 5 SSD性能状态

openGauss学习笔记-136 openGauss 数据库运维-例行维护-检查数据库性能-LMLPHP

12-01 10:46