sys500 memory occupation

2025-07-25 06:01:00  Updated

This topic describes performance metrics related to sys500 memory occupation in an OceanBase cluster. You can specify a statistical range to query the metrics in a single zone or on a single OBServer node of an OceanBase cluster.

tenant500_memory

Definition

The size of memory (excluding OB_KVSTORE_CACHE_MB) occupied by the sys500 tenant on an OBServer node of a cluster within the specified statistical range.

Description

Metric Metric name Unit
tenant500_memory tenant500_mem_hold GiB

Calculation expression

sum(ob_tenant500_memory_hold_bytes{@LABELS}) by (@GBLABELS) / 1073741824

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) */ sum(hold) as hold, sum(used) as used from __all_virtual_memory_info where tenant_id = 500 and svr_ip = ? and svr_port = ? and mod_name <> 'OB_KVSTORE_CACHE_MB'
    
  • If you use OceanBase Database V4.0 or later, execute the following statement:

    select /* MONITOR_AGENT */ sum(hold) as hold, sum(used) as used from V$OB_MEMORY where tenant_id = 500 and svr_ip = ? and svr_port = ? and MOD_NAME <> 'KvstorCacheMb
    

tenant500_memory_percent

Definition

The ratio of memory (excluding OB_KVSTORE_CACHE_MB) occupied by the sys500 tenant on an OBServer node of a cluster to total memory of the OBServer node.

Description

Metric Metric name Unit
tenant500_memory_percent tenant500_mem_hold_percent %

Calculation expression

100 * sum(ob_tenant500_memory_hold_bytes{@LABELS}) by (@GBLABELS) / sum(ob_server_resource_memory_bytes{@LABELS}) by (@GBLABELS)

SQL statements for metric collection

  • Collected metric: ob_tenant500_memory_hold_bytes

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

      select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ sum(hold) as hold, sum(used) as used from __all_virtual_memory_info where tenant_id = 500 and svr_ip = ? and svr_port = ? and mod_name <> 'OB_KVSTORE_CACHE_MB'
      
    • If you use OceanBase Database V4.0 or later, execute the following statement:

      select /* MONITOR_AGENT */ sum(hold) as hold, sum(used) as used from V$OB_MEMORY where tenant_id = 500 and svr_ip = ? and svr_port = ? and MOD_NAME <> 'KvstorCacheMb'
      
  • Collected metric: ob_server_resource_memory_bytes

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

      select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ cpu_total, cpu_assigned, mem_total, mem_assigned,disk_total, cpu_assigned_percent, mem_assigned_percent from __all_virtual_server_stat where svr_ip = ? and svr_port = ?
      
    • If you use OceanBase Database V2.0 or later but earlier than V4.0, execute the following statement:

      select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ cpu_total,cpu_max_assigned as cpu_assigned,mem_total,mem_max_assigned as mem_assigned,disk_total, cpu_assigned_percent, mem_assigned_percent from __all_virtual_server_stat where svr_ip = ? and svr_port = ?
      
    • If you use OceanBase Database V4.0 or later, execute the following statement:

       select /* MONITOR_AGENT */ cpu_capacity_max as cpu_total,cpu_assigned_max as cpu_assigned,mem_capacity as mem_total,mem_assigned as mem_assigned,data_disk_capacity as disk_total, (cpu_assigned_max / cpu_capacity_max) as cpu_assigned_percent, (mem_assigned / mem_capacity) as mem_assigned_percent from V$OB_SERVERS where svr_ip = ? and svr_port = ?
      

Contact Us