This topic introduces the performance metric MemStore Lock Request Success Rate for OceanBase tenants. The MemStore Lock Request Success Rate metric tracks the success rate of MemStore lock requests in an OceanBase tenant. It is broken down into two sub-metrics to statistically analyze the execution time of XA statements in a tenant: memstore_read_lock_succ_ratio and memstore_write_lock_succ_ratio. You can specify the statistical scope to query the MemStore Lock Request Success Rate of a tenant in a single zone or OBServer node.
memstore_read_lock_succ_ratio
Metric description
The success rate of read lock requests in the MemStore of an OceanBase tenant.
Parameter description
Metric |
Metric name |
Unit |
|---|---|---|
| memstore_read_lock_succ_ratio | memstore_read_lock_succ_ratio | % |
Calculation formula
100 * 1 / (1 + sum(rate(ob_sysstat{stat_id="60020",@LABELS}[@INTERVAL])) by (@GBLABELS) / sum(rate(ob_sysstat{stat_id="60019",@LABELS}[@INTERVAL])) by (@GBLABELS))
Sampling SQL
For OceanBase Database V2.2.70 and later, but earlier than V4.0:
select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (60019, 60020) and (con_id > 1000 or con_id = 1) and class < 1000For OceanBase Database V4.0 and later:
select /* MONITOR_AGENT */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (60019, 60020) and (con_id > 1000 or con_id = 1) and class < 1000
memstore_write_lock_succ_ratio
Metric description
The success rate of write lock requests in the MemStore of an OceanBase tenant.
Parameter description
Metric |
Metric name |
Unit |
|---|---|---|
| memstore_write_lock_succ_ratio | memstore_write_lock_succ_ratio | % |
Calculation formula
100 * 1 / (1 + sum(rate(ob_sysstat{stat_id="60022",@LABELS}[@INTERVAL])) by (@GBLABELS) / sum(rate(ob_sysstat{stat_id="60021",@LABELS}[@INTERVAL])) by (@GBLABELS))'
Sampling SQL
For OceanBase Database V2.2.70 and later, but earlier than V4.0:
select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (60021, 60022) and (con_id > 1000 or con_id = 1) and class < 1000OceanBase Database V4.0 and later:
select /* MONITOR_AGENT */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (60021, 60022) and (con_id > 1000 or con_id = 1) and class < 1000
