MemStore

2025-07-25 05:50:59  Updated

This topic describes monitoring metrics related to the MemStore within an OceanBase Database tenant. You can specify a statistical period to query the MemStore statistics in a single zone or on a single OBServer of an OceanBase Database tenant.

total

Definition

The MemStore size prepared for a tenant in the specified statistical period.

Description

Metric Metric field name Unit
total total_memstore_used Byte

Calculation expression

sum(ob_sysstat{stat_id="130001",@LABELS}) by (@GBLABELS) / 1048576

SQL statements for metric collection

  • If you use OceanBase Database of a version earlier than V4.0, execute the following statement:

    select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (130001) and (con_id > 1000 or con_id = 1) and class < 1000
    
  • If you use OceanBase Database V4.0 or later, execute the following statement:

    select /* MONITOR_AGENT */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (130001) and (con_id > 1000 or con_id = 1) and class < 1000
    

active

Definition

The size of active MemStores in the specified statistical period.

Description

Metric Metric field name Unit
active active_memstore_used Byte

Calculation expression

sum(ob_sysstat{stat_id="130000",@LABELS}) by (@GBLABELS) / 1048576

SQL statements for metric collection

  • If you use OceanBase Database of a version earlier than V4.0, execute the following statement:

    select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (130000) and (con_id > 1000 or con_id = 1) and class < 1000
    
  • If you use OceanBase Database V4.0 or later, execute the following statement:

    select /* MONITOR_AGENT */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (130000) and (con_id > 1000 or con_id = 1) and class < 1000
    

trigger

Definition

The MemStore size that triggers a major compaction in the specified statistical period. If the active MemStore size reaches this metric value, a major compaction is triggered.

Description

Metric Metric field name Unit
trigger major_freeze_trigger Byte

Calculation expression

sum(ob_sysstat{stat_id="130002",@LABELS}) by (@GBLABELS) / 1048576

SQL statements for metric collection

  • If you use OceanBase Database of a version earlier than V4.0, execute the following statement:

    select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (130002) and (con_id > 1000 or con_id = 1) and class < 1000
    
  • If you use OceanBase Database V4.0 or later, execute the following statement:

    select /* MONITOR_AGENT */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (130002) and (con_id > 1000 or con_id = 1) and class < 1000
    

limit

Definition

The maximum MemStore size allowed to be used. If the value of the total_memstore_used metric field is greater than or equal to this metric value, data cannot be written to the MemStores.

Description

Metric Metric field name Unit
limit memstore_limit Byte

Calculation expression

sum(ob_sysstat{stat_id="130004",@LABELS}) by (@GBLABELS) / 1048576

SQL statements for metric collection

  • If you use OceanBase Database of a version earlier than V4.0, execute the following statement:

    select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (130004) and (con_id > 1000 or con_id = 1) and class < 1000
    
  • If you use OceanBase Database V4.0 or later, execute the following statement:

    select /* MONITOR_AGENT */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (130004) and (con_id > 1000 or con_id = 1) and class < 1000
    

Contact Us