可以使用 onstat -g ckp 命令打印 checkpoint 历史记录,显示配置建议(如果检测到次优的配置)。
图: onstat -g ckp 命令输出
Auto Checkpoints=On RTO_SERVER_RESTART=60 seconds Estimated recovery time 7 seconds
Critical Sections Clock Total Flush Block # Ckpt Wait Long #Dirty Interval Time Trigger LSN Time Time Time Waits Time Time Time Buffers 1 18:41:36 Startup 1:f8 0.0 0.0 0.0 0 0.0 0.0 0.0 4 2 18:41:49 Admin 1:11c12cc 0.3 0.2 0.0 1 0.0 0.0 0.0 2884 3 18:42:21 Llog 8:188 2.3 2.0 2.0 1 0.0 2.0 2.0 14438 4 18:42:44*User 10:19c018 0.0 0.0 0.0 1 0.0 0.0 0.0 39 5 18:46:21 RTO 13:188 54.8 54.2 0.0 30 0.6 0.4 0.6 68232
Physical Log Logical Log Dskflu Total Avg Total Avg /Sec Pages /Sec Pages /Sec 4 3 0 1 0 2884 1966 163 4549 379 7388 318 10 65442 2181 39 536 21 20412 816 1259 210757 1033 150118 735
Max Plog Max Llog Max Dskflush Avg Dskflush Avg Dirty Blocked pages/sec pages/sec Time pages/sec pages/sec Time 8796 6581 54 43975 2314 0
触发器名称 | 描述 |
---|---|
Admin | 管理员相关任务。例如:
|
Backup | 备份相关操作。例如:
|
CDR | 第一次启动 ER 子系统或在所有复制参与者被移除后,重启 ER 子系统 |
CKPTINTVL | 当 checkpoint 间隔过期。Checkpoint 间隔是在 onconfig 文件中 CKPTINTVL 参数指定的值 |
Conv/Rev | 转换复原 checkpoint 。转换检查阶段后磁盘结构实际实际转换前。复原完成之后也将触发 checkpoint 。 |
HA | 高可用性。例如:
|
HDR | 高可用性数据复制。例如:
|
Lightscan | 在分区上关闭观察四周之前 |
Llog | 逻辑日志资源耗尽 |
LongTX | 长事务。如果发现长事务未停止,那么会发起 checkpoint 停止该事务。在回滚过程中,如果在长事务终止后 checkpoint 还未准备发生,那么会在回滚阶段发起 checkpoint 。 |
Misc | 杂项事件。例如::
|
Plog | 物理日志具有以下之一的条件:
|
Restore Pt | 还原点。Checkpoint 在还原点开始和结束。还原点(由转换守护程序使用)是启用的 CONVERSION_GUARD 配置参数,是 RESTORE_POINT_DIR 配置参数指定的临时目录。 |
Recovery | 在恢复过程中,快速恢复开始时 |
Reorg | 在联机索引生成开始 |
RTO | 维护恢复时间目标(RTO)协议。在正常操作时,在系统崩溃后重新启动的时间可能会超过 RTO_SERVER_RESTART 配置参数所设置的值。 |
Stamp Wrap | Checkpoint 时间戳。如果新的 checkpoint 时间戳出现在最后写入的 checkpoint 之前,那么时间戳在 checkpoint 间间隔先进先出。这样会触发另一个 checkpoint 。 |
Startup | 数据库服务器启动时。 |
Uncompress | 在表或分区上发生解压命令。只在表中的 checkpoint 或 没有日志记录的数据库中应用。 |
User | 用户提交 checkpoint 请求 |
如果 GBase 8s 数据服务器检测到一个次优的配置,那么在 checkpoint 历史记录下会出现一个有关性能调整的建议消息。该性能建议也在消息日志中出现。以下是性能建议消息的示例:
Physical log is too small for bufferpool size. System performance may be less than optimal. Increase physical log size to at least %ldKb Physical log is too small for optimal performance. Increase the physical log size to at least $ldKb. Logical log space is too small for optimal performance. Increase the total size of the logial log space to at least %ld Kb. Transaction blocking has taken place. The physical log is too small. Please increase the size of the physical log to %ldKb Transaction blocking has taken place. The logical log space is too small. Please increase the size of the logical log space to %ldKb