一、字段说明
| 字段名 | 类型 | 描述 |
| sid | bigint unsigned | LogService 的唯一标识符 |
| unflush_min_commit_ts | bigint unsigned | 当前 LogService 未持久化的最小事务 commit ts |
| rep_group_num | bigint unsigned | 当前 LogService 回放的 RG 数量 |
| mc_job_ts_advanced | bigint unsigned | MC job ts 推进的时间点 |
| read_from_disk_num | bigint unsigned | 从磁盘读取临时落盘数据的次数 |
| dump_max_mem_size | bigint unsigned | 允许 Binlog Dump 使用的最大内存 |
| dump_use_mem_size | bigint unsigned | 当前 Binlog Dump 使用的内存量 |
| log_handler_cache_size | bigint unsigned | Log Handler 内存占用 |
| peer_client_cache_size | bigint unsigned | Binlog Dump 内存占用 |
| wait_flush_binlog_cache_size | bigint unsigned | Binlog Thread 内存占用 |
| alloc_from_mem | bigint unsigned | 从内存中分配的内存量(参见 alloc_mem_from_file) |
| alloc_mem_from_file | bigint unsigned | 从文件中映射的内存量 |
| binlog_thread_run_time | bigint unsigned | Binlog Thread 整体运行耗时 |
| flush_binlog_time | bigint unsigned | Binlog Thread 将 Binlog Cache 写到 Binlog 文件的耗时 |
| read_from_disk_time | bigint unsigned | 从磁盘中读取临时落盘数据的耗时 |
| decode_record_time | bigint unsigned | 解析存储层 key/value 的耗时 |
| write_begin_time | bigint unsigned | 将 begin query event 写到 Binlog Cache 的耗时 |
| write_gtid_time | bigint unsigned | 将 gtid event 写到 Binlog Cache 的耗时 |
| write_xid_event_time | bigint unsigned | 将 xid commit event 写到 Binlog Cache 的耗时 |
| write_row_time | bigint unsigned | 将 table record 转换成 row change event 的耗时 |
| write_table_map_time | bigint unsigned | 将 table map event 写到 Binlog Cache 的耗时 |
| flush_pending_rows_event_time | bigint unsigned | 将 row change event 写到 Binlog Cache 的耗时 |
| persist_gno | bigint unsigned | 当前持久化的 gno |
| persist_commit_ts | bigint unsigned | 持久化的 gno 对应的事务 commit ts |
| persist_info_update_ts | varchar(64) | 最后持久化的时间点 |
| flush_bytes | bigint unsigned | 当前进程写入的 Binlog 字节数 |
| binlog_file_write_time | bigint unsigned | 写 Binlog 文件 write 系统调用的耗时 |
| binlog_file_flush_time | bigint unsigned | 写 Binlog 文件 flush 系统调用的耗时 |
| binlog_file_sync_time | bigint unsigned | 写 Binlog 文件 sync 系统调用的耗时 |
| flush_rate(MB/s) | bigint unsigned | flush 系统调用刷磁盘的速率 |
关键指标说明
1. 内存使用监控
·dump_use_mem_size 与 dump_max_mem_size 比值可评估内存使用率
·各组件内存占用(log_handler、peer_client、binlog_thread)帮助定位时耗
2. 性能瓶颈分析
·各阶段耗时统计可识别性能瓶颈
·磁盘 I/O 相关指标(flush_rate)反映存储性能
3. 持久化进度
·persist_commit_ts 和 persist_info_update_ts 显示数据持久化状态
·flush_bytes 统计累计写入量
二、示例
tdsql > SELECT * FROM INFORMATION_SCHEMA.LOGSERVICE_DUMP_STAT\\G*************************** 1. row *************************** sid: 29629282460369180 unflush_min_commit_ts: NULL rep_group_num: 2 mc_job_ts_advanced: 29629300260995193 read_from_disk_num: 14 dump_max_mem_size: 16788990976 dump_use_mem_size: 62914560 log_handler_cache_size: 0 peer_client_cache_size: 0 wait_flush_binlog_cache_size: 0 alloc_from_mem: 0 alloc_mem_from_file: 0 binlog_thread_run_time: 18 flush_binlog_time: 2 read_from_disk_time: 2 decode_record_time: 6 write_begin_time: 0 write_gtid_time: 0 write_xid_event_time: 0 write_row_time: 4 write_table_map_time: 0flush_pending_rows_event_time: 0 persist_gno: 27 persist_commit_ts: 29629299858342126 persist_info_update_ts: 2025-12-18 15:45:09 flush_bytes: 707677465 binlog_file_write_time: 0 binlog_file_flush_time: 0 binlog_file_sync_time: 0 flush_rate(MB/s): 01 row in set (0.00 sec)
结果解读
·当前服务管理2个 RG,内存使用率较低(62MB/16GB)
·已持久化到 gno=27,对应 commit ts=29629299858342126
·累计写入约675MB Binlog 数据
·系统运行状态正常,各项指标均在合理范围内