更新时间:2026-11-23 GMT+08:00

GS_GET_KVSTORE_DB_STALL_DETAIL_STATS

GS_GET_KVSTORE_DB_STALL_DETAIL_STATS视图用于获取RocksDB内部写入失速情况的信息,通过汇总当前集群各节点各RocksDB实例的写入减慢或写入暂停情况,辅助判断是否存在写入瓶颈。该视图仅9.1.2及以上集群版本支持,且需要开启LSM引擎(enable_lsm_engine参数设置为on)才可访问。

表1 GS_GET_KVSTORE_DB_STALL_DETAIL_STATS字段

名称

类型

描述

node

text

当前数据所在DN节点名称。

cf_name

text

当前数据所在列族名称。

bucket_id

bigint

当前bucket分区ID。

kvdb_id

bigint

所在RocksDB实例ID,与bucket分区ID相对应。

cf_l0_file_count_delays_with_ongoing_comp

bigint

正在进行L0压缩时,由l0文件计数限制导致的写入速度减慢次数。

cf_l0_file_count_stop_with_ongoing_comp

bigint

正在进行L0压缩时,由于L0文件计数限制导致写入停止次数。

l0_file_count_limit_delays

bigint

当 level 0 的SST文件达到level0_slowdown_writes_trigger的时候,写入进入失速状态,单位次。

l0_file_count_limit_stops

bigint

当level0的SST文件达到level0_stop_writes_trigger,写入完全停止,单位次。

memtable_limit_delays

bigint

如果 max_write_buffer_number 大于3,并且等待落盘的memtable数量大于或者等于max_write_buffer_number - 1,写入进入失速状态,单位次。

memtable_limit_stops

bigint

当等待落盘的memtable数量大于或等于max_write_buffer_number时,写入会完全停止,以等待落盘完成,单位次。

pending_compaction_bytes_delays

bigint

当预计的等待压缩的字节数达到soft_pending_compaction_bytes,写失速开始,单位次。

pending_compaction_bytes_stops

bigint

当预计的等待压缩字节数达到hard_pending_compaction_bytes,写入会完全停止,等待压缩,单位次。

total_delays

bigint

发生delays次数和。

total_stops

bigint

发生stops次数和。

cumulative_stall_time

text

累计失速时间。

cumulative_stall_percent

bigint

累计失速百分比。

interval_stall_time

text

间隔周期内失速时间。

interval_stall_percent

bigint

间隔周期内失速百分比。

write_buffer_manager_limit_stops

bigint

由于写缓存限制导致的停止,单位次。

应用示例

使用GS_GET_KVSTORE_DB_STALL_DETAIL_STATS视图查询RocksDB实例后台写入失速的情况。

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
select * from  GS_GET_KVSTORE_DB_STALL_DETAIL_STATS ('write_group');
| cf_name | bucket_id |      kvdb_id       | cf_l0_file_count_delays_with_ongoing_comp | cf_l0_file_count_stop_with_ongoing_comp | l0_file_count_limit_delaysbigint | l0_file_count_limit_stopsbigint | memtable_limit_delays | memtable_limit_stops | pending_compactio
n_bytes_delays | pending_compaction_bytes_stops | total_delays | total_stops | cumulative_stall_time | cumulative_stall_percent | interval_stall_time | interval_stall_percent | write_buffer_manager_limit_stops
-----------+---------+-----------+--------------------+-------------------------------------------+-----------------------------------------+----------------------------------+---------------------------------+-----------------------+----------------------+------------------
---------------+--------------------------------+--------------+-------------+-----------------------+--------------------------+---------------------+------------------------+----------------------------------
   datanode2 | index   |         9 | 931330329192550409 |                                         0 |                                       0 |                                0 |                               0 |                     0 |                    0 |
               0 |                              0 |            0 |           0 | 00:00:0.000 H:M:S     |                        0 | 00:00:0.000 H:M:S   |                      0 |                                0
   datanode2 | delta   |         9 | 931330329192550409 |                                         0 |                                       0 |                                0 |                               0 |                     0 |                    0 |
               0 |                              0 |            0 |           0 | 00:00:0.000 H:M:S     |                        0 | 00:00:0.000 H:M:S   |                      0 |                                0
   datanode2 | cudesc  |         9 | 931330329192550409 |                                         0 |                                       0 |                                0 |                               0 |                     0 |                    0 |
               0 |                              0 |            0 |           0 | 00:00:0.000 H:M:S     |                        0 | 00:00:0.000 H:M:S   |                      0 |                                0
   datanode2 | index   |         1 | 931330329192550401 |                                         0 |                                       0 |                                0 |                               0 |                     0 |                    0 |
               0 |                              0 |            0 |           0 | 00:00:0.000 H:M:S     |                        0 | 00:00:0.000 H:M:S   |                      0 |                                0
   datanode2 | delta   |         1 | 931330329192550401 |                                         0 |                                       0 |                                0 |                               0 |                     0 |                    0 |
               0 |                              0 |            0 |           0 | 00:00:0.000 H:M:S     |                        0 | 00:00:0.000 H:M:S   |                      0 |                                0
   datanode2 | cudesc  |         1 | 931330329192550401 |                                         0 |                                       0 |                                0 |                               0 |                     0 |                    0 |
               0 |                              0 |            0 |           0 | 00:00:0.000 H:M:S     |                        0 | 00:00:0.000 H:M:S   |                      0 |                                0
   datanode1 | index   |        14 | 931330329192550414 |                                         0 |                                       0 |                                0 |                               0 |                     0 |                    0 |
               0 |                              0 |            0 |           0 | 00:00:0.000 H:M:S     |                        0 | 00:00:0.000 H:M:S   |                      0 |                                0
   datanode1 | delta   |        14 | 931330329192550414 |                                         0 |                                       0 |                                0 |                               0 |                     0 |                    0 |
               0 |                              0 |            0 |           0 | 00:00:0.000 H:M:S     |                        0 | 00:00:0.000 H:M:S   |                      0 |                                0
   datanode1 | cudesc  |        14 | 931330329192550414 |                                         0 |                                       0 |                                0 |                               0 |                     0 |                    0 |
               0 |                              0 |            0 |           0 | 00:00:0.000 H:M:S     |                        0 | 00:00:0.000 H:M:S   |                      0 |                                0
   datanode1 | index   |         6 | 931330329192550406 |                                         0 |                                       0 |                                0 |                               0 |                     0 |                    0 |
               0 |                              0 |            0 |           0 | 00:00:0.000 H:M:S     |                        0 | 00:00:0.000 H:M:S   |                      0 |                                0
   datanode1 | delta   |         6 | 931330329192550406 |                                         0 |                                       0 |                                0 |                               0 |                     0 |                    0 |
               0 |                              0 |            0 |           0 | 00:00:0.000 H:M:S     |                        0 | 00:00:0.000 H:M:S   |                      0 |                                0